login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A138002
a(3*n)=2*n, a(3*n+1)=a(n)+n, a(3*n+2)=2*a(n), a(n)=0 for n<3.
3
0, 0, 0, 2, 1, 0, 4, 2, 0, 6, 5, 4, 8, 5, 2, 10, 5, 0, 12, 10, 8, 14, 9, 4, 16, 8, 0, 18, 15, 12, 20, 15, 10, 22, 15, 8, 24, 20, 16, 26, 18, 10, 28, 16, 4, 30, 25, 20, 32, 21, 10, 34, 17, 0, 36, 30, 24, 38, 29, 20, 40, 28, 16, 42, 35, 28, 44, 31, 18, 46, 27, 8, 48, 40, 32, 50, 33, 16, 52
OFFSET
0,4
COMMENTS
a(A062318(n)) = 0.
LINKS
FORMULA
a(n) = (n mod 3) * a(floor(n/3)) + (2 - n mod 3) * floor(n/3), a(n) = 0.
CROSSREFS
Cf. A025480.
Sequence in context: A139136 A122792 A348218 * A261877 A062296 A249343
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 26 2008
STATUS
approved