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.

A238375 Row sums of triangle in A152719.

Original entry on oeis.org

1, 2, 4, 6, 11, 16, 28, 40, 69, 98, 168, 238, 407, 576, 984, 1392, 2377, 3362, 5740, 8118, 13859, 19600, 33460, 47320, 80781, 114242, 195024, 275806, 470831, 665856, 1136688, 1607520, 2744209, 3880898, 6625108, 9369318, 15994427, 22619536, 38613964, 54608392
Offset: 0

Views

Author

Philippe Deléham, Feb 25 2014

Keywords

Examples

			Triangle A152719 and row sums:
  1;  ............................. sum =  1
  1, 1;  .......................... sum =  2
  1, 2, 1;  ....................... sum =  4
  1, 2, 2,  1;  ................... sum =  6
  1, 2, 5,  2,  1;  ............... sum = 11
  1, 2, 5,  5,  2, 1;  ............ sum = 16
  1, 2, 5, 12,  5, 2, 1;  ......... sum = 28
  1, 2, 5, 12, 12, 5, 2, 1;  ...... sum = 40
		

Crossrefs

Cf. A000129, A002203, A005409, A048739, A135153 (first differences), A152719.

Programs

  • Mathematica
    Table[Sum[Fibonacci[1+Min[k, n-k], 2], {k,0,n}], {n,0,45}] (* G. C. Greubel, May 21 2021 *)
  • PARI
    my(x='x+O('x^44)); Vec((1+x)/((1-2*x^2-x^4)*(1-x))) \\ Joerg Arndt, May 22 2021
  • Sage
    def Pell(n): return n if (n<2) else 2*Pell(n-1) + Pell(n-2)
    def a(n): return sum(Pell(1+min(k, n-k)) for k  in (0..n))
    [a(n) for n in (0..45)] # G. C. Greubel, May 21 2021
    

Formula

a(n) = Sum_{k=0..n} A152719(n,k).
G.f.: (1+x)/((1-2*x^2-x^4)*(1-x)).
a(2*n) = A005409(n+2).
a(2*n+1) = 2*A048739(n).
a(n) = (-4 + 2*(1+(-1)^n)*Pell((n+4)/2) + (1-(-1)^n)*Q((n+3)/2))/4, where Pell(n) = A000129(n) and Q(n) = A002203(n). - G. C. Greubel, May 21 2021
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)+a(n-4)-a(n-5). - Wesley Ivan Hurt, May 22 2021

A103415 Triangle, read by rows, T(n,k) = A000129(n+1) - Sum_{j=1..k} t(n+1, j), where t(n, k) is defined in the formula section.

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 12, 11, 6, 1, 29, 28, 21, 8, 1, 70, 69, 60, 35, 10, 1, 169, 168, 157, 116, 53, 12, 1, 408, 407, 394, 333, 204, 75, 14, 1, 985, 984, 969, 884, 653, 332, 101, 16, 1, 2378, 2377, 2360, 2247, 1870, 1189, 508, 131, 18, 1, 5741, 5740, 5721, 5576, 5001, 3712, 2029, 740, 165, 20, 1
Offset: 0

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.net) and Gary W. Adamson, Feb 04 2005

Keywords

Comments

Triangle is generated from the product A*B of the infinite lower triangular matrices A = A008288(n,k) and B =
1;
1 1;
1 1 1;
1 1 1 1; ...
Determinant(A*B) = 1 for all n.
Absolute values of coefficients of characteristic polynomials of n-th matrix are the (n+1)-th row of A007318 (Pascal's triangle). As they are:
x^1 - 1;
x^2 - 2*x^1 + 1;
x^3 - 3*x^2 + 3*x^1 - 1;
x^4 - 4*x^3 + 6*x^2 - 4*x^1 + 1;
x^5 - 5*x^4 + 10*x^3 - 10*x^2 + 5*x^1 - 1.

Examples

			Triangle begins as:
    1;
    2,   1;
    5,   4,   1;
   12,  11,   6,   1;
   29,  28,  21,   8,   1;
   70,  69,  60,  35,  10,  1;
  169, 168, 157, 116,  53, 12,  1;
  408, 407, 394, 333, 204, 75, 14, 1;
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_]:= If[k==0, (2*Boole[n<2] + LucasL[n-1, 2]*Boole[n>1])/2, Binomial[n-1, k-1]*Hypergeometric2F1[1-k, k-n, 1-n, -1]];
    st[n_, k_]:= Sum[t[n+1, j], {j,k}];
    T[n_, k_]:= Fibonacci[n+1, 2] - st[n, k];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, May 25 2021 *)
  • PARI
    Pell(n) = if( n<2, n, 2*Pell(n-1) + Pell(n-2) );
    t(n, k) = if(n<3, 1, if(k==1||k==n, 1, t(n-1,k) + t(n-1,k-1) + t(n-2,k-1) ));
    st(n, k) = sum(i=1, k, t(n+1,i));
    T(n, k) = Pell(n+1) - st(n,k);
    for(n=0, 10, for(k=0, n, print1(T(n,k), ",")); print()) \\ modified by G. C. Greubel, May 25 2021
    
  • Sage
    @CachedFunction
    def t(n,k): return 1 if (n<3) else 1 if (k==1 or k==n) else t(n-1,k) + t(n-1,k-1) + t(n-2,k-1)
    def st(n,k): return sum(t(n+1, j) for j in (1..k))
    def T(n,k): return lucas_number1(n+1,2,-1) - st(n,k)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 25 2021

Formula

T(n, k) = Pell(n+1) - ST(n, k), where ST(n, k) = Sum_{j=1..k} t(n+1, j), t(n, k) = t(n-1,k) + t(n-1,k-1) + t(n-2,k-1), t(n, 1) = t(n, n) = 1 and t(0, k) = t(1, k) = t(2, k) = 1.
T(n, 0) = A000129(n+1).
T(n, 1) = A005409(n) = A000129(n) - 1.
Sum_{k=0..n} T(n, k) = A026937(n).
From G. C. Greubel, May 25 2021: (Start)
T(n, k) = A000129(n+1) - st(n,k), where st(n, k) = Sum_{j=1..k} t(n+1, j), t(n, k) = A008288(n-1, k-1) for n >= 1 and k >= 1, and t(n, 0) = (1/2)*(2*[n<2] + A002203(n-1)*[n>1]).
T(n, n) = A000012(n).
T(n, n-1) = A005843(n+1).
T(n, n-2) = A093328(n-1).
T(n, n-3) = (4/3)*((n-3)^3 + 5*(n-3) + 3).
T(n, n-4) = (1/3)*(2*(n-4)^2 + 22*(n-4)^2 + 22*(n-4) + 39). (End)

A193530 Expansion of (1 - 2*x - 2*x^2 + 3*x^3 + x^5)/((1-x)*(1-2*x-x^2)*(1-2*x^2-x^4)).

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 31, 66, 159, 363, 876, 2065, 4985, 11915, 28765, 69156, 166957, 402373, 971414, 2343519, 5657755, 13654969, 32966011, 79577190, 192116331, 463786191, 1119678912, 2703086893, 6525829037, 15754607063, 38034986041, 91824246216, 221683340569, 535190123593, 1292063254826
Offset: 0

Views

Author

F. Chapoton and N. J. A. Sloane, Jul 29 2011

Keywords

Comments

This sequence was initially confused with A003120, but they are different sequences. The g.f. used here as the definition was found by Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009.

Crossrefs

Programs

  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1-2*x-2*x^2 +3*x^3+x^5)/((1-x)*(1-2*x-x^2)*(1-2*x^2-x^4)) )); // Vincenzo Librandi, Aug 28 2016
    
  • Maple
    f:=n->if n mod 2 = 0 then (1/4)*(A001333(n-2)+A001333((n-2)/2)+A001333((n-4)/2)+1) else (1/4)*(A001333(n-2)+A001333((n-1)/2)+A001333((n-3)/2)+1); fi; # produces the sequence with a different offset
  • Mathematica
    LinearRecurrence[{3,1,-7,3,-1,1,1}, {1,1,2,3,7,13,31}, 40] (* Vincenzo Librandi, Aug 28 2016 *)
    Table[(2 +LucasL[n, 2] +2*(1+(-1)^n)*Fibonacci[(n+2)/2, 2] + 2*(1-(-1)^n)*Fibonacci[(n+1)/2, 2])/8, {n, 0, 40}] (* G. C. Greubel, May 21 2021 *)
  • Sage
    @CachedFunction
    def Pell(n): return n if (n<2) else 2*Pell(n-1) + Pell(n-2)
    def A193530(n): return (1 + Pell(n+1) - Pell(n) + (1 + (-1)^n)*Pell((n+2)/2) + (1-(-1)^n)*Pell((n+1)/2) )/4
    [A193530(n) for n in (0..40)] # G. C. Greubel, May 21 2021

Formula

a(n) = 1 + A005409(floor((n+3)/2)) + A107769(n).
From G. C. Greubel, May 21 2021: (Start)
a(n) = (1 + A001333(n) + A135153(n+2))/4.
a(n) = (2 + Q(n) + 2*(1+(-1)^n)*Pell((n+2)/2) + 2*(1-(-1)^n)*Pell((n+1)/2))/8.
a(2*n) = (2 + Q(2*n) + 4*Pell(n+1))/8.
a(2*n+1) = (2 + Q(2*n+1) + 4*Pell(n+1))/8, where Pell(n) = A000129(n), and Q(n) = A002203. (End)
Previous Showing 21-23 of 23 results.