login
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