login
A108585
a(n) = a(n-1) + 2*A005185(n+1), with a(1) = 2.
2
2, 6, 12, 18, 26, 36, 46, 58, 70, 82, 98, 114, 130, 150, 168, 188, 210, 232, 256, 280, 304, 328, 360, 388, 416, 448, 480, 512, 544, 584, 618, 652, 692, 734, 772, 812, 856, 898, 942, 988, 1034, 1082, 1130, 1178, 1226, 1274, 1338, 1386, 1436, 1496, 1552, 1604
OFFSET
1,1
LINKS
MATHEMATICA
Hofstadter[n_]:= Hofstadter[n]= If[n<3, 1, Hofstadter[n-Hofstadter[n- 1]] + Hofstadter[n-Hofstadter[n-2]]];
a[n_]:= a[n]= If[n==1, 2, a[n-1] +2*Hofstadter[n+1]];
Table[a[n], {n, 60}]
PROG
(SageMath)
@CachedFunction
def H(n): return 1 if (n<3) else H(n-H(n-1)) + H(n-H(n-2))
def a(n): return 2 if (n==1) else a(n-1) + 2*H(n+1)
[a(n) for n in range(1, 61)] # G. C. Greubel, Dec 19 2022
CROSSREFS
Sequence in context: A162802 A330320 A267461 * A294062 A193764 A278484
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Jul 05 2005
STATUS
approved