A043325 Duplicate of A023692.
1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 27, 29, 33, 35, 45, 47, 51, 53, 55, 57
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a062756 0 = 0 a062756 n = a062756 n' + m `mod` 2 where (n',m) = divMod n 3 -- Reinhard Zumkeller, Feb 21 2013
Table[Count[IntegerDigits[i, 3], 1], {i, 0, 200}] Nest[Join[#, # + 1, #] &, {0}, 5] (* IWABUCHI Yu(u)ki, Sep 08 2012 *)
a(n)=if(n<1,0,a(n\3)+(n%3)%2) \\ Paul D. Hanna, Feb 24 2006
a(n)=hammingweight(digits(n,3)%2); \\ Ruud H.G. van Tol, Dec 10 2023
from sympy.ntheory import digits def A062756(n): return digits(n,3)[1:].count(1) # Chai Wah Wu, Dec 23 2022
Comments