OFFSET
0,2
COMMENTS
This sequence can be represented as a binary tree. Each child to the left is obtained by applying A253560 to the parent, and each child to the right is obtained by applying A253550 to the parent:
1
|
...................2...................
4 3
8......../ \........6 9......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 12 18 10 27 15 25 7
32 24 36 20 54 30 50 14 81 45 75 21 125 35 49 11
etc.
Sequence A253565 is the mirror image of the same tree. Also in binary trees A005940 and A163511 the terms on level of the tree are some permutation of the terms present on the level n of this tree. A252464(n) tells distance of n from 1 in all these trees. Of these four trees, this is the one where the left child is always larger than the right child.
Note that the indexing of sequence starts from 0, although its range starts from one.
a(n) (n>=1) can be obtained by the composition of a bijection between {1,2,3,4,...} and the set of integer partitions and a bijection between the set of integer partitions and {2,3,4,...}. Explanation on the example n=10. Write 2*n = 20 as a binary number: 10100. Consider a Ferrers board whose southeast border is obtained by replacing each 1 by an east step and each 0 by a north step. We obtain the Ferrers board of the partition p = (2,2,1). Finally, a(10) = 2'*2'*1', where m' = m-th prime. Thus, a(10)= 3*3*2 = 18. - Emeric Deutsch, Sep 17 2016
LINKS
FORMULA
As a composition of other permutations:
Other identities and observations. For all n >= 0:
For all n >= 1: a(2n) - a(2n+1) > 0. [See the comment above.]
MAPLE
a:= proc(n) local m; m:= n; [0]; while m>0 do `if`(1=
irem(m, 2, 'm'), map(x-> x+1, %), [%[], 0]) od:
`if`(n=0, 1, mul(ithprime(i), i=%))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Aug 23 2017
MATHEMATICA
p[n_] := p[n] = FactorInteger[n][[-1, 1]];
b[n_] := n p[n];
c[1] = 1; c[n_] := (n/p[n]) NextPrime[p[n]];
a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ[n], b[a[n/2]], c[a[(n-1)/2]]];
a /@ Range[0, 100] (* Jean-François Alcover, Feb 15 2021 *)
PROG
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Jan 03 2015
STATUS
approved