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.

A027276 a(n) = Sum_{k=0..2n} (k+1) * A026552(n, k).

Original entry on oeis.org

1, 6, 27, 72, 270, 648, 2268, 5184, 17496, 38880, 128304, 279936, 909792, 1959552, 6298560, 13436928, 42830208, 90699264, 287214336, 604661760, 1904684544, 3990767616, 12516498432, 26121388032, 81629337600, 169789022208
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:= [6,27,72,270]; [1] cat [n le 4 select I[n] else 12*(Self(n-2) - 3*Self(n-4)): n in [1..41]]; // G. C. Greubel, Dec 18 2021
    
  • Mathematica
    Table[-(1/2)*Boole[n==0] + (1/4)*6^(n/2)*(n+1)*(3*(1+(-1)^n) + Sqrt[6]*(1-(-1)^n)), {n, 0, 40}] (* G. C. Greubel, Dec 18 2021 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -36,0,12,0]^n*[1;6;27;72])[1,1] \\ Charles R Greathouse IV, Oct 21 2022
  • Sage
    @CachedFunction
    def T(n,k): # T = A026552
        if (k==0 or k==2*n): return 1
        elif (k==1 or k==2*n-1): return (n+2)//2
        elif (n%2==0): return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
        else: return T(n-1, k) + T(n-1, k-2)
    @CachedFunction
    def a(n): return sum( (k+1)*T(n,k) for k in (0..2*n) )
    [a(n) for n in (0..40)] # G. C. Greubel, Dec 18 2021
    

Formula

a(n) = Sum_{k=0..2n} (k+1) * A026552(n, k).
G.f.: (1 +6*x +15*x^2 -18*x^3)/(1-6*x^2)^2.
a(n) = -(1/2)*[n=0] + (1/4)*6^(n/2)*(n + 1)*(3*(1 + (-1)^n) + sqrt(6)*(1 - (-1)^n)). - G. C. Greubel, Dec 18 2021