

A007379


Earliest sequence with a(a(n)) = 4n.
(Formerly M0973)


10



0, 2, 4, 5, 8, 12, 7, 24, 16, 10, 36, 13, 20, 44, 15, 56, 32, 18, 68, 21, 48, 76, 23, 88, 28, 26, 100, 29, 96, 108, 31, 120, 64, 34, 132, 37, 40, 140, 39, 152, 144, 42, 164, 45, 52, 172, 47, 184, 80, 50, 196, 53, 176, 204, 55, 216, 60, 58, 228, 61, 224, 236, 63, 248
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


REFERENCES

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS



FORMULA

a(8n)=4*a(2n), a(8n+1)=8n+2, a(8n+2)=32n+4, a(8n+3)=8n+5, a(8n+4)=4*a(2n+1), a(8n+5)=32n+12, a(8n+6)=8n+7, a(8n+7)=32n+24


MATHEMATICA

a[n_] := a[n] = Which[ Mod[n, 8] == 0, 4*a[n/4], Mod[n, 8] == 1, n+1, Mod[n, 8] == 2, 4*(n2)+4, Mod[n, 8] == 3, n+2, Mod[n, 8] == 4, 4*a[(n4)/4+1], Mod[n, 8] == 5, 4*(n5) + 12, Mod[n, 8] == 6, n+1, True, 4*(n7)+24]; a[0] = 0; Table[ a[n], {n, 0, 63}] (* JeanFrançois Alcover, Sep 24 2012 *)


CROSSREFS



KEYWORD

nonn,nice


AUTHOR



EXTENSIONS



STATUS

approved



