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 11-16 of 16 results.

A026961 Self-convolution of array T given by A026626.

Original entry on oeis.org

1, 2, 11, 34, 138, 492, 1830, 6804, 25576, 96728, 367932, 1405884, 5392590, 20751504, 80076872, 309748096, 1200669828, 4662772672, 18137643524, 70657441212, 275620281310, 1076429623256, 4208562777342, 16470788108008, 64519534566362, 252948764993472, 992453764928050
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    p1:= func< n | -1864800 + 1239076*n + 7915984*n^2 - 11263411*n^3 + 5406551*n^4 - 1042185*n^5 + 65025*n^6 >;
    p2:= func< n | -4505760 + 7236856*n + 10545958*n^2 - 20700889*n^3 + 10823147*n^4 - 2188767*n^5 + 143055*n^6 >;
    p3:= func< n | -1522080 + 2667320*n + 3116288*n^2 - 6715322*n^3 + 3619972*n^4 - 755718*n^5 + 52020*n^6 >;
    p4:= func< n | 42*(-376320 + 434044*n + 1225808*n^2 - 1997637*n^3 + 1002947*n^4 - 199767*n^5 + 13005*n^6) >;
    p5:= func< n | 2*(-559440 + 1665230*n - 243157*n^2 - 1361078*n^3 + 898312*n^4 - 195432*n^5 + 13005*n^6) >;
    I:=[11, 34, 138]; [1,2] cat [n le 3 select I[n] else (p1(n)*Self(n-1) + p2(n)*Self(n-2) + p3(n)*Self(n-3) + p4(n))/p5(n) : n in [1..40]]; // G. C. Greubel, Jun 21 2024
    
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, (6*n-1 + (-1)^n)/4, T[n-1,k-1] +T[n-1,k]]];
    A026961[n_]:= A026961[n] = Sum[T[n,k]*T[n,n-k], {k,0,n}];
    Table[A026961[n], {n,0,50}] (* G. C. Greubel, Jun 21 2024 *)
  • SageMath
    @CachedFunction
    def T(n, k): # T = A026626
        if (k==0 or k==n): return 1
        elif (k==1 or k==n-1): return int(3*n//2)
        else: return T(n-1, k-1) + T(n-1, k)
    def A026961(n): return sum(T(n,k)*T(n,n-k) for k in range(n+1))
    [A026961(n) for n in range(41)] # G. C. Greubel, Jun 21 2024

Formula

From G. C. Greubel, Jun 21 2024: (Start)
a(n) = Sum_{k=0..n} T(n, k)*T(n, n-k). - G. C. Greubel, Jun 21 2024
a(n) = (p1(n)*a(n-1) + p2(n)*a(n-2) + p3(n)*a(n-3) + p4(n))/p5(n), where
p1(n) = 22589280 - 75610404*n + 85542748*n^2 - 44611965*n^3 + 11592851*n^4 - 1432335*n^5 + 65025*n^6.
p2(n) = 32659200 - 131052480*n + 161621002*n^2 - 88742247*n^3 + 23912807*n^4 - 3047097*n^5 + 143055*n^6.
p3(n) = 2*(5034960 - 21140910*n + 26659783*n^2 - 14896395*n^3 + 4089431*n^4 - 533919*n^5 + 26010*n^6).
p4(n) = 42*(3628800 - 13099136*n + 15429146*n^2 - 8267195*n^3 + 2196857*n^4 - 277797*n^5 + 13005*n^6).
p5(n) = 2*n*(-6580128 + 11379344*n - 7168746*n^2 + 2070547*n^3 - 273462*n^4 + 13005*n^5). (End)

Extensions

More terms from Sean A. Irvine, Oct 20 2019

A026962 a(n) = Sum_{k=0..n-1} T(n,k) * T(n,k+1), with T given by A026626.

Original entry on oeis.org

1, 6, 24, 108, 406, 1572, 5961, 22788, 87209, 335010, 1290376, 4983162, 19286891, 74797176, 290586771, 1130716508, 4406049037, 17191077082, 67152699384, 262594530318, 1027851765350, 4026831276662, 15788979175102, 61954847930374, 243278117470476, 955907159445522
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[3*n/2], T[n-1,k-1] +T[n-1,k]]]; (* T = A026626 *)
    A262962[n_]:=Sum[T[n,k]*T[n,k+1], {k,0,n-1}];
    Table[A262962[n], {n,40}] (* G. C. Greubel, Jun 23 2024 *)
  • SageMath
    @CachedFunction
    def T(n, k): # T = A026626
        if (k==0 or k==n): return 1
        elif (k==1 or k==n-1): return int(3*n//2)
        else: return T(n-1, k-1) + T(n-1, k)
    def A262962(n): return sum( T(n,k)*T(n,k+1) for k in range(n))
    [A262962(n) for n in range(1,41)] # G. C. Greubel, Jun 23 2024

Extensions

More terms from Sean A. Irvine, Oct 20 2019

A026963 a(n) = Sum_{k=0..n-2} T(n,k) * T(n,k+2), with T given by A026626.

Original entry on oeis.org

1, 8, 52, 224, 987, 3980, 16057, 63732, 252424, 996332, 3927977, 15471622, 60915547, 239794516, 943946193, 3716205884, 14632901696, 57631689776, 227042423404, 894698122022, 3526753844436, 13906101471344, 54848887043366, 216402159510134, 854053133294062, 3371593602442500
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[3*n/2], T[n-1,k-1] +T[n-1,k]]]; (* T = A026626 *)
    A262963[n_]:= Sum[T[n,k]*T[n,k+2], {k,0,n-2}];
    Table[A262963[n], {n,2,40}] (* G. C. Greubel, Jun 23 2024 *)
  • SageMath
    @CachedFunction
    def T(n, k): # T = A026626
        if (k==0 or k==n): return 1
        elif (k==1 or k==n-1): return int(3*n//2)
        else: return T(n-1, k-1) + T(n-1, k)
    def A262963(n): return sum( T(n,k)*T(n,k+2) for k in range(n-1))
    [A262963(n) for n in range(2,41)] # G. C. Greubel, Jun 23 2024

Extensions

More terms from Sean A. Irvine, Oct 20 2019

A026964 a(n) = Sum_{k=0..n-3} T(n,k) * T(n,k+3), with T given by A026626.

Original entry on oeis.org

1, 12, 77, 434, 1978, 8830, 37409, 156474, 644305, 2632506, 10684360, 43166246, 173768764, 697596990, 2794438513, 11174809302, 44626341136, 178018744896, 709505830530, 2825762505810, 11247704919634, 44749537493028, 177970696795672, 707580176408854, 2812524327414647
Offset: 3

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, Floor[3*n/2], T[n-1,k-1] +T[n-1,k]]]; (* T = A026626 *)
    A262964[n_]:= Sum[T[n,k]*T[n,k+3], {k,0,n-3}];
    Table[A262964[n], {n,3,40}] (* G. C. Greubel, Jun 23 2024 *)
  • SageMath
    @CachedFunction
    def T(n, k): # T = A026626
        if (k==0 or k==n): return 1
        elif (k==1 or k==n-1): return int(3*n//2)
        else: return T(n-1, k-1) + T(n-1, k)
    def A262964(n): return sum( T(n,k)*T(n,k+3) for k in range(n-2))
    [A262964(n) for n in range(3,41)] # G. C. Greubel, Jun 23 2024

Extensions

More terms from Sean A. Irvine, Oct 20 2019

A026965 a(n) = Sum_{k=0..n} (k+1) * A026626(n,k).

Original entry on oeis.org

1, 3, 10, 25, 66, 154, 360, 810, 1810, 3982, 8700, 18850, 40614, 87030, 185680, 394570, 835578, 1763998, 3713700, 7798770, 16340302, 34166086, 71303160, 148548250, 308980386, 641728494, 1330992460, 2757055810, 5704253430
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n le 1 select 2*n+1 else (n+2)*(17*2^(n-2) -3 +(-1)^n)/6: n in [0..40]]; // G. C. Greubel, Jun 23 2024
    
  • Mathematica
    Table[(n+2)*(17*2^(n-2) -3 +(-1)^n)/6 +(1/4)*(Boole[n==0] +3*Boole[n== 1]), {n,0,50}] (* G. C. Greubel, Jun 23 2024 *)
  • SageMath
    [(n+2)*(17*2^(n-2) -3 +(-1)^n)/6 + (1/4)*(int(n==0) + 3*int(n==1)) for n in range(41)] # G. C. Greubel, Jun 23 2024

Formula

G.f.: (1-x-x^3+3*x^4-5*x^5-2*x^6+3*x^7)/((1-x)^2*(1+x)^2*(1-2*x)^2). - Colin Barker, Apr 26 2015
From G. C. Greubel, Jun 23 2024: (Start)
a(n) = (1/6)*(n+2)*(17*2^(n-2) - 3 + (-1)^n) + (1/4)*([n=0] + 3*[n=1]).
a(n) = ( n*(n+2)*a(n-1) + 2*(n+1)*(n+2)*a(n-2) + n*(n+1)*(n+2) )/(n*(n + 1)), with a(0) = 1, a(1) = 3, a(2) = 10, a(3) = 25.
E.g.f.: (1/12)*( 17*(1+x)*exp(2*x) - 6*(2+x)*exp(x) + 2*(2-x)*exp(-x) + 3*(1+3*x) ). (End)

A080239 Antidiagonal sums of triangle A035317.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 15, 24, 40, 64, 104, 168, 273, 441, 714, 1155, 1870, 3025, 4895, 7920, 12816, 20736, 33552, 54288, 87841, 142129, 229970, 372099, 602070, 974169, 1576239, 2550408, 4126648, 6677056, 10803704, 17480760, 28284465, 45765225, 74049690
Offset: 1

Views

Author

Paul Barry, Feb 11 2003

Keywords

Comments

Convolution of Fibonacci sequence with sequence (1, 0, 0, 0, 1, 0, 0, 0, 1, ...).
There is an interesting relation between a(n) and the Fibonacci sequence f(n). Sqrt(a(4n-2)) = f(2n). By using this fact we can calculate the value of a(n) by the following (1),(2),(3),(4) and (5). (1) a(1) = 1. (2) If n = 2 (mod 4), then a(n) = f((n+2)/2)^2. (3) If n = 3 (mod 4), then a(n) = (f((n+5)/2)^2-2f((n+1)/2)^2-1)/3. (4) If n = 0 (mod 4), then a(n) = (f((n+4)/2)^2+f(n/2)^2-1)/3. (5) If n = 1 (mod 4), then a(n) = (2f((n+3)/2)^2-f((n-1)/2)^2+1)/3. - Hiroshi Matsui and Ryohei Miyadera, Aug 08 2006
Sequences of the form s(0)=a, s(1)=b, s(n) = s(n-1) + s(n-2) + k if n mod m = p, else s(n) = s(n-1) + s(n-2) will have a form fib(n-1)*a + fib(n)*b + P(x)*k. a(n) is the P(x) sequence for m=4...s(n) = fib(n)*a + fib(n-1)*b + a(n-4-p)*k. - Gary Detlefs, Dec 05 2010
A different formula for a(n) as a function of the Fibonacci numbers f(n) may be conjectured. The pattern is of the form a(n) = f(p)*f(p-q) - 1 if n mod 4 = 3, else f(p)*f(p-q) where p = 2,2,4,4,4,4,6,6,6,6,8,8,8,8... and q = 0,1,3,2,0,1,3,2,0,1,3,2... p(n) = 2 * A002265(n+4) = 2*(floor((n+3)/2) - floor((n+3)/4)) (see comment by Jonathan Vos Post at A002265). A general formula for sequences having period 4 with terms a,b,c,d is given in A121262 (the discrete Fourier transform, as for all periodic sequences) and is a function of t(n)= 1/4*(2*cos(n*Pi/2) + 1 + (-1)^n). r4(a,b,c,d,n) = a*t(n+3) + b*t(n+2) + c*t(n+1) + d*t(n). This same formula may be used to subtract the 1 at n mod 4 = 3. a(n) = f(p(n))*f(p(n) - r4(1,0,3,2,n)) - r4(0,0,1,0,n). - Gary Detlefs, Dec 09 2010
This sequence is the sequence B4,1 on p. 34 of "Pascal-like triangles and Fibonacci-like sequences" in the references. In this article the authors treat more general sequences that have this sequence as an example. - Hiroshi Matsui and Ryohei Miyadera, Apr 11 2014
It is easy to see that a(n) = a(n-4) + f(n), where f(n) is the Fibonacci sequence. By using this repeatedly we have for a natural number m
a(4m) =a(4) + f(4m) + f(4m-4) + ... + f(8),
a(4m+1) = a(1) + f(4m) + f(4m-4) + ... + f(5),
a(4m+2) = a(2) + f(4m) + f(4m-4) + ... + f(6) and
a(4m+3) = a(3) + f(4m) + f(4m-4) + ... + f(7).
- Wataru Takeshita and Ryohei Miyadera, Apr 11 2014
a(n-1) counts partially ordered partitions of (n-1) into (1,2,3,4) where the position (order) of 2's is unimportant. E.g., a(5)=6 (n-1)=4 These are (4),(31),(13),(22),(211,121,112=one),(1111). - David Neil McGrath, May 12 2015

Crossrefs

Programs

  • GAP
    List([1..40], n-> Sum([0..Int((n-1)/4)], k-> Fibonacci(n-4*k) )); # G. C. Greubel, Jul 13 2019
  • Haskell
    a080239 n = a080239_list !! (n-1)
    a080239_list = 1 : 1 : zipWith (+)
       (tail a011765_list) (zipWith (+) a080239_list $ tail a080239_list)
    -- Reinhard Zumkeller, Jan 06 2012
    
  • Magma
    I:=[1,1,2,3,6,9]; [n le 6 select I[n] else Self(n-1)+Self(n-2)+Self(n-4)-Self(n-5)-Self(n-6): n in [1..50]]; // Vincenzo Librandi, Jun 07 2015
    
  • Maple
    f:=proc(n) option remember; local t1; if n <= 2 then RETURN(1); fi: if n mod 4 = 1 then t1:=1 else t1:=0; fi: f(n-1)+f(n-2)+t1; end; [seq(f(n), n=1..100)]; # N. J. A. Sloane, May 25 2008
    with(combinat): f:=n-> fibonacci(n): p:=n-> 2*(floor((n+3)/2)-floor((n+3)/4)): t:=n-> 1/4*(2*cos(n*Pi/2)+1+(-1)^n): r4:=(a,b,c,d,n)-> a*t(n+3)+b*t(n+2)+c*t(n+1)+d*t(n): seq(f(p(n))*f(p(n)-r4(1,0,3,2,n))-r4(0,0,1,0,n), n = 1..33); # Gary Detlefs, Dec 09 2010
    with(combinat): a:=proc(n); add(fibonacci(n-4*k),k=0..floor((n-1)/4)) end: seq(a(n), n = 1..33); # Johannes W. Meijer, Apr 19 2012
  • Mathematica
    (*f[n] is the Fibonacci sequence and a[n] is the sequence of A080239*) f[n_]:= f[n] =f[n-1] +f[n-2]; f[1]=1; f[2]=1; a[n_]:= Which[n==1, 1, Mod[n, 4]==2, f[(n+2)/2]^2, Mod[n, 4]==3, (f[(n+5)/2]^2 - 2f[(n + 1)/2]^2 -1)/3, Mod[n, 4]==0, (f[(n+4)/2]^2 + f[n/2]^2 -1)/3, Mod[n, 4] == 1, (2f[(n+3)/2]^2 -f[(n-1)/2]^2 +1)/3] (* Hiroshi Matsui and Ryohei Miyadera, Aug 08 2006 *)
    a=0; b=0; lst={a,b}; Do[z=a+b+1; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z; z=a+b; AppendTo[lst,z]; a=b; b=z,{n,4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 16 2010 *)
    (* Let f[n] be the Fibonacci sequence and a2[n] the sequence A080239 expressed by another formula discovered by Wataru Takeshita and Ryohei Miyadera *)
    f=Fibonacci; a2[n_]:= Block[{m, s}, s = Mod[n, 4]; m = (n-s)/4;
    Which[n==1, 1, n==2, 1, n==3, 2, s==0, 3 + Sum[f[4 i], {i, 2, m}], s == 1, 1 + Sum[f[4i+1], {i, 1, m}], s==2, 1 + Sum[f[4i+2], {i, 1, m}], s == 3, 2 + Sum[f[4i+3], {i, 1, m}]]]; Table[a2[n], {n, 1, 40}] (* Ryohei Miyadera, Apr 11 2014, minor update by Jean-François Alcover, Apr 29 2014 *)
    LinearRecurrence[{1, 1, 0, 1, -1, -1}, {1, 1, 2, 3, 6, 9}, 41] (* Vincenzo Librandi, Jun 07 2015 *)
  • PARI
    vector(40, n, f=fibonacci; sum(k=0,((n-1)\4), f(n-4*k))) \\ G. C. Greubel, Jul 13 2019
    
  • Sage
    [sum(fibonacci(n-4*k) for k in (0..floor((n-1)/4))) for n in (1..40)] # G. C. Greubel, Jul 13 2019
    

Formula

G.f.: x/((1-x^4)(1 - x - x^2)) = x/(1 - x - x^2 - x^4 + x^5 + x^6).
a(n) = a(n-1) + a(n-2) + a(n-4) - a(n-5) - a(n-6).
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..floor((n-j)/2)} binomial(n-j-2k, j-2k) for n>=0.
Another recurrence is given in the Maple code.
If n mod 4 = 1 then a(n) = a(n-1) + a(n-2) + 1, else a(n)= a(n-1) + a(n-2). - Gary Detlefs, Dec 05 2010
a(4n) = A058038(n) = Fibonacci(2n+2)*Fibonacci(2n).
a(4n+1) = A081016(n) = Fibonacci(2n+2)*Fibonacci(2n+1).
a(4n+2) = A049682(n+1) = Fibonacci(2n+2)^2.
a(4n+3) = A081018(n+1) = Fibonacci(2n+2)*Fibonacci(2n+3).
a(n) = 8*a(n-4) - 8*a(n-8) + a(n-12), n>12. - Gary Detlefs, Dec 10 2010
a(n+1) = a(n) + a(n-1) + A011765(n+1). - Reinhard Zumkeller, Jan 06 2012
a(n) = Sum_{k=0..floor((n-1)/4)} Fibonacci(n-4*k). - Johannes W. Meijer, Apr 19 2012
Previous Showing 11-16 of 16 results.