This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A108585 #12 Dec 20 2022 08:02:38 %S A108585 2,6,12,18,26,36,46,58,70,82,98,114,130,150,168,188,210,232,256,280, %T A108585 304,328,360,388,416,448,480,512,544,584,618,652,692,734,772,812,856, %U A108585 898,942,988,1034,1082,1130,1178,1226,1274,1338,1386,1436,1496,1552,1604 %N A108585 a(n) = a(n-1) + 2*A005185(n+1), with a(1) = 2. %H A108585 G. C. Greubel, <a href="/A108585/b108585.txt">Table of n, a(n) for n = 1..1000</a> %t A108585 Hofstadter[n_]:= Hofstadter[n]= If[n<3, 1, Hofstadter[n-Hofstadter[n- 1]] + Hofstadter[n-Hofstadter[n-2]]]; %t A108585 a[n_]:= a[n]= If[n==1, 2, a[n-1] +2*Hofstadter[n+1]]; %t A108585 Table[a[n], {n,60}] %o A108585 (SageMath) %o A108585 @CachedFunction %o A108585 def H(n): return 1 if (n<3) else H(n-H(n-1)) + H(n-H(n-2)) %o A108585 def a(n): return 2 if (n==1) else a(n-1) + 2*H(n+1) %o A108585 [a(n) for n in range(1,61)] # _G. C. Greubel_, Dec 19 2022 %Y A108585 Cf. A005185, A108583. %K A108585 nonn,less %O A108585 1,1 %A A108585 _Roger L. Bagula_, Jul 05 2005