OFFSET
0,2
COMMENTS
Permutation of odd squarefree numbers (A056911).
a(n) is the n-th power of 3 in the monoid defined in A331590. - Peter Munn, May 02 2020
FORMULA
G.f.: Product_{k>=0} (1 + prime(k+2) * x^(2^k)).
a(0) = 1; a(n) = prime(floor(log_2(n)) + 2) * a(n - 2^floor(log_2(n))).
a(2^(k-1)-1) = A002110(k)/2 for k > 0.
From Peter Munn, May 02 2020: (Start)
a(2n) = A003961(a(n)).
a(2n+1) = 3 * a(2n).
a(n) = A225546(4^n).
a(n+k) = A331590(a(n), a(k)).
A048675(a(n)) = 2n.
(End)
a(n+1) = A334748(a(n)). - Peter Munn, Mar 04 2022
EXAMPLE
21 = 2^0 + 2^2 + 2^4 so a(21) = prime(2) * prime(4) * prime(6) = 3 * 7 * 13 = 273.
MAPLE
a:= n-> (l-> mul(ithprime(i+1)^l[i], i=1..nops(l)))(convert(n, base, 2)):
seq(a(n), n=0..55); # Alois P. Heinz, Feb 10 2020
MATHEMATICA
nmax = 55; CoefficientList[Series[Product[(1 + Prime[k + 2] x^(2^k)), {k, 0, Floor[Log[2, nmax]]}], {x, 0, nmax}], x]
a[0] = 1; a[n_] := Prime[Floor[Log[2, n]] + 2] a[n - 2^Floor[Log[2, n]]]; Table[a[n], {n, 0, 55}]
PROG
(PARI) a(n) = my(b=Vecrev(binary(n))); prod(k=1, #b, if (b[k], prime(k+1), 1)); \\ Michel Marcus, Feb 10 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 10 2020
STATUS
approved