cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A108585 a(n) = a(n-1) + 2*A005185(n+1), with a(1) = 2.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Jul 05 2005

Keywords

Crossrefs

Programs

  • 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}]
  • 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
Showing 1-1 of 1 results.