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”).

A002518
Earliest sequence with a(a(n))=5n.
6
0, 2, 5, 4, 15, 10, 7, 30, 9, 40, 25, 12, 55, 14, 65, 20, 17, 80, 19, 90, 75, 22, 105, 24, 115, 50, 27, 130, 29, 140, 35, 32, 155, 34, 165, 150, 37, 180, 39, 190, 45, 42, 205, 44, 215, 200, 47, 230, 49, 240, 125, 52, 255, 54, 265, 60, 57, 280, 59, 290, 275, 62, 305
OFFSET
0,2
FORMULA
a(5n)=5*a(n), a(5n+1)=5n+2, a(5n+2)=25n+5, a(5n+3)=5n+4, a(5n+4)=25n+15
MATHEMATICA
a[n_] := a[n] = Which[ Mod[n, 5] == 0, 5*a[n/5], Mod[n, 5] == 1, n+1, Mod[n, 5] == 2, 5*(n-2)+5, Mod[n, 5] == 3, n+1, True, 5*(n-4)+15]; a[0] = 0; Table[ a[n], {n, 0, 62}] (* Jean-François Alcover, Sep 24 2012 *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Corrected description and more terms from Henry Bottomley, Apr 27 2000
STATUS
approved