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.

Previous Showing 21-23 of 23 results.

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

Original entry on oeis.org

1, 6, 18, 72, 180, 648, 1512, 5184, 11664, 38880, 85536, 279936, 606528, 1959552, 4199040, 13436928, 28553472, 90699264, 191476224, 604661760, 1269789696, 3990767616, 8344332288, 26121388032, 54419558400, 169789022208
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,6,18,72]; [n le 4 select I[n] else 12*(Self(n-2) - 3*Self(n-4)): n in [1..41]]; // G. C. Greubel, Dec 21 2021
    
  • Mathematica
    CoefficientList[Series[(1+6x+6x^2)/(1-6x^2)^2,{x,0,30}],x] (* or *) LinearRecurrence[{0,12,0,-36},{1,6,18,72},30] (* Harvey P. Dale, Jun 19 2015 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -36,0,12,0]^n*[1;6;18;72])[1,1] \\ Charles R Greathouse IV, Oct 18 2022
  • Sage
    [((n+1)/2)*6^((n-1)/2)*( 3*(1-(-1)^n) + sqrt(6)*(1+(-1)^n) ) for n in (0..40)] # G. C. Greubel, Dec 21 2021
    

Formula

a(n) = Sum_{k=0..2n} (k+1) * A026519(n, k).
G.f.: (1+6*x+6*x^2)/(1-6*x^2)^2.
a(n) = 12*a(n-2) - 36*a(n-4), with a(0)=1, a(1)=6, a(2)=18, a(3)=72. - Harvey P. Dale, Jun 19 2015
a(n) = ((n+1)/2)*6^((n-1)/2)*( 3*(1-(-1)^n) + sqrt(6)*(1+(-1)^n) ). - G. C. Greubel, Dec 21 2021

A026533 a(n) = Sum_{i=0..n} Sum_{j=0..i} T(i,j), T given by A026519.

Original entry on oeis.org

1, 3, 7, 18, 40, 104, 231, 607, 1353, 3575, 7989, 21169, 47384, 125757, 281798, 748638, 1678832, 4463098, 10014074, 26635050, 59787092, 159078450, 357193976, 950678416, 2135189511, 5684158586, 12769030254, 33999245582
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<0 || k>2*n, 0, If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+1)/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k], T[n-1, k-1] + T[n-1, k-2] + T[n-1, k] ]]]]; (* T = A026519 *)
    a[n_]:= a[n]= Block[{$RecursionLimit = Infinity}, Sum[T[i,j], {i,0,n}, {j,0,i}] ];
    Table[a[n], {n, 0, 40}] (* G. C. Greubel, Dec 20 2021 *)
  • Sage
    @CachedFunction
    def T(n,k): # T = A026519
        if (k<0 or k>2*n): return 0
        elif (k==0 or k==2*n): return 1
        elif (k==1 or k==2*n-1): return (n+1)//2
        elif (n%2==0): return T(n-1, k) + T(n-1, k-2)
        else: return T(n-1, k) + T(n-1, k-1) + T(n-1, k-2)
    @CachedFunction
    def a(n): return sum(sum( T(i,j) for j in (0..i)) for i in (0..n) )
    [a(n) for n in (0..40)] # G. C. Greubel, Dec 20 2021

Formula

a(n) = Sum_{i=0..n} Sum_{j=0..i} A026519(i,j).

A026554 a(n) = T(n,n-1), T given by A026552. Also a(n) is the number of integer strings s(0),...,s(n) counted by T, such that s(n)=1.

Original entry on oeis.org

1, 2, 4, 10, 19, 52, 98, 278, 526, 1516, 2887, 8389, 16073, 46936, 90386, 264842, 512128, 1504432, 2918954, 8592094, 16716998, 49288856, 96119927, 283795571, 554524660, 1639174304, 3208254571, 9493241125, 18607536319, 55108565584
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k>2*n, 0, If[k==0 || k==2*n, 1, If[k==1 || k==2*n-1, Floor[(n+2)/2], If[EvenQ[n], T[n-1, k-2] + T[n-1, k] + T[n-1, k-1], T[n-1, k-2] + T[n-1, k]]]]];
    Table[T[n, n-1], {n, 40}] (* G. C. Greubel, Dec 17 2021 *)
  • 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)
    [T(n,n-1) for n in (1..40)] # G. C. Greubel, Dec 17 2021

Formula

a(n) = A026520(n+1)/2.
Previous Showing 21-23 of 23 results.