A117592 a(n) = a(3n) = a(3n+1) = a(3n+2)/2 with a(0)=1.
1, 1, 2, 1, 1, 2, 2, 2, 4, 1, 1, 2, 1, 1, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 4, 4, 8, 1, 1, 2, 1, 1, 2, 2, 2, 4, 1, 1, 2, 1, 1, 2, 2, 2, 4, 2, 2, 4, 2, 2, 4, 4, 4, 8, 2, 2, 4, 2, 2, 4, 4, 4, 8, 2, 2, 4, 2, 2, 4, 4, 4
Offset: 0
Links
- Felix Fröhlich, Table of n, a(n) for n = 0..10000 (first 2001 terms from Vincenzo Librandi)
Crossrefs
Programs
-
Mathematica
Nest[ Join[#, #, 2#] &, {1}, 5] (* Robert G. Wilson v, Jul 27 2014 *)
-
PARI
a(n) = 1 << hammingweight(digits(n,3)>>1); \\ Kevin Ryde, Nov 15 2020
-
Python
from gmpy2 import digits def A117592(n): return 1<
Chai Wah Wu, Dec 05 2024
Formula
a(n) = a(3n)/a(0) = a(3n+1)/a(1) = a(3n+2)/a(2).
a(n) = abs(A117942(n)).
G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2) * A(x^3). - Ilya Gutkovskiy, Nov 15 2020
a(n) = 2^A081603(n). - Kevin Ryde, Nov 15 2020
Extensions
a(0) = 1 added to the Name by Bernard Schott, Dec 04 2020
Comments