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.

A026642 a(n) = A026637(2*n-1, n-2).

Original entry on oeis.org

1, 7, 28, 112, 439, 1711, 6652, 25846, 100450, 390670, 1520764, 5925718, 23112931, 90239407, 352654084, 1379410438, 5400188206, 21157958962, 82959736504, 325514137048, 1278093308806, 5021436970822, 19740128055928
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 7^(n-1) else ((7*n^2+3*n+2)*Self(n-1) + 2*n*(2*n+1)*Self(n-2))/(2*(n-1)*(n+2)): n in [1..40]]; // G. C. Greubel, Jul 01 2024
    
  • Mathematica
    a[n_]:= a[n]= If[n<4, 7^(n-2), ((7*n^2-11*n+6)*a[n-1] + 2*(n-1)*(2*n- 1)*a[n-2])/(2*(n-2)*(n+1))];
    Table[a[n], {n,2,40}] (* G. C. Greubel, Jul 01 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A026642
        if n<4: return 7^(n-2)
        else: return ((7*n^2-11*n+6)*a(n-1) + 2*(n-1)*(2*n-1)*a(n-2))/(2*(n-2)*(n+1))
    [a(n) for n in range(2,41)] # G. C. Greubel, Jul 01 2024

Formula

a(n) = ( (7*n^2 - 11*n + 6)*a(n-1) + 2*(n-1)*(2*n-1)*a(n-2) )/(2*(n-2)*(n+1)), n >= 4. - G. C. Greubel, Jul 01 2024