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.

Showing 1-10 of 12 results. Next

A144476 Four interlaced copies of A117373.

Original entry on oeis.org

1, 1, -1, 3, -2, -2, 2, 1, -3, -3, 3, -2, -1, -1, 1, -3, 2, 2, -2, -1, 3, 3, -3, 2, 1, 1, -1, 3, -2, -2, 2, 1, -3, -3, 3, -2, -1, -1, 1, -3, 2, 2, -2, -1, 3, 3, -3, 2, 1, 1, -1
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 10 2008

Keywords

Programs

  • Mathematica
    Clear[M, v, n, a] M[0] = {{0, -1}, {1, 1}}; M[1] = {{1, 0}, {1, 1}}; M[2] = {{-1, 0}, {1, 1}}; M[3] = {{0, 1}, {1, 1}}; v[0] = {1, 1}; v[n_] := v[n] = M[Mod[n, 4]].v[n - 1]; a = Table[v[n][[1]], {n, 0, 50}]

Formula

a(n)=a(n-4)-a(n-8). a(4n+1)=a(4n+2)=A117373(n). a(4n+3)=A117373(n+3). a(4n+4)=A117373(n+5). [From R. J. Mathar, Dec 08 2008]
G.f.: -x*(2*x^7-3*x^6+3*x^5+3*x^4-3*x^3+x^2-x-1) / (x^8-x^4+1). - Colin Barker, Apr 11 2013

A003520 a(n) = a(n-1) + a(n-5); a(0) = ... = a(4) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 8, 11, 15, 20, 26, 34, 45, 60, 80, 106, 140, 185, 245, 325, 431, 571, 756, 1001, 1326, 1757, 2328, 3084, 4085, 5411, 7168, 9496, 12580, 16665, 22076, 29244, 38740, 51320, 67985, 90061, 119305, 158045, 209365, 277350, 367411, 486716, 644761
Offset: 0

Views

Author

Keywords

Comments

This comment covers a family of sequences which satisfy a recurrence of the form a(n) = a(n-1) + a(n-m), with a(n) = 1 for n = 0..m-1. The generating function is 1/(1-x-x^m). Also a(n) = Sum_{i=0..n/m} binomial(n-(m-1)*i, i). This family of binomial summations or recurrences gives the number of ways to cover (without overlapping) a linear lattice of n sites with molecules that are m sites wide. Special case: m=1: A000079; m=4: A003269; m=5: A003520; m=6: A005708; m=7: A005709; m=8: A005710.
Also counts ordered partitions such that no part is less than 5. For example, a(12) = a(11) + a(7) where a(7) counts 11,6+5 and 5+6 and a(11) counts 15,10+5, 9+6,8+7,7+8,6+9,5+10 and 5+5+5. Thus a(12) = 3 + 8 = 11. a(12) counts 16,11+5,10+6,9+7,8+8,7+9,6+10 and 6+5+5 but also 5+11,5+6+5 and 5+5+6. Similar results hold for the other sequences formed by a(n) = a(n-1) + a(n-k). - Alford Arnold, Aug 06 2003
Number of compositions of n into parts 1 and 5. - Joerg Arndt, Jun 25 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=5, 2*a(n-5) equals the number of 2-colored compositions of n with all parts >= 5, such that no adjacent parts have the same color. - Milan Janjic, Nov 27 2011
a(n+4) equals the number of binary words of length n having at least 4 zeros between every two successive ones. - Milan Janjic, Feb 07 2015
Number of tilings of a 5 X n rectangle with 5 X 1 pentominoes. - M. Poyraz Torcuk, Mar 26 2022

References

  • A. Brousseau, Fibonacci and Related Number Theoretic Tables. Fibonacci Association, San Jose, CA, 1972, p. 119.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Apart from initial terms, same as A017899.

Programs

  • Maple
    a[0]:=1:a[1]:=1:a[2]:=1:a[3]:=1:a[4]:=1:for n from 5 to 60 do a[n]:=a[n-1]+a[n-5] od:seq(a[n],n=0..60);
    with(combstruct): SeqSetU := [S, {S=Sequence(U), U=Set(Z, card > 4)}, unlabeled]: seq(count(SeqSetU, size=j), j=5..55); # Zerinvary Lajos, Oct 10 2006
    A003520:=-1/(z**3+z**2-1)/(z**2-z+1); # Simon Plouffe in his 1992 dissertation
    ZL:=[S, {a = Atom, b = Atom, S = Prod(X,Sequence(Prod(X,b))), X = Sequence(b,card >= 4)}, unlabelled]: seq(combstruct[count](ZL, size=n), n=4..54); # Zerinvary Lajos, Mar 26 2008
    M := Matrix(5, (i,j)-> if j=1 then [1, 0, 0, 0, 1][i] elif (i=j-1) then 1 else 0 fi); a:= n-> (M^(n))[1,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 27 2008
  • Mathematica
    a[0] = a[1] = a[2] = a[3] = a[4] = 1; a[n_] := a[n] = a[n - 1] + a[n - 5]; Table[ a[n], {n, 0, 49}] (* Robert G. Wilson v, Dec 09 2004 *)
    CoefficientList[Series[1/(1 - x - x^5), {x, 0, 51}], x] (* Zerinvary Lajos, Mar 29 2007 *)
    LinearRecurrence[{1, 0, 0, 0, 1}, {1, 1, 1, 1, 1}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2012 *)
    nxt[{a_,b_,c_,d_,e_}]:={b,c,d,e,e+a}; NestList[nxt,{1,1,1,1,1},50][[;;,1]] (* Harvey P. Dale, Sep 27 2023 *)
  • Maxima
    a(n):=sum(binomial(n-1+(-4)*j,j),j,0,(n-1)/4); /* Vladimir Kruchinin, May 23 2011 */
    
  • PARI
    my(x='x+O('x^66)); Vec(x/(1-(x+x^5))) /* Joerg Arndt, Jun 25 2011 */

Formula

G.f.: 1/(1-x-x^5) = 1/((1-x+x^2)(1-x^2-x^3)).
a(n) = Sum_{j=0..(n-1)/4} binomial(n-1+(-4)*j,j).
For n>5, a(n) = floor( d*c^n + 1/2) where c is the positive real root of x^5-x^4-1 and d is the positive real root of 161*x^3-23*x^2-12*x-1 ( c=1.32471795724474602... and d=0.3811571478326847...) - Benoit Cloitre, Nov 30 2002
a(n) = term (1,1) in the 5 X 5 matrix [1,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,0,0,0,0]^n. - Alois P. Heinz, Jul 27 2008
For positive integers n and k such that k <= n <= 5*k, and 4 divides n-k, define c(n,k) = binomial(k,(n-k)/4), and c(n,k)=0, otherwise. Then, for n >= 1, a(n) = sum(c(n,k), k=1..n). - Milan Janjic, Dec 09 2011
Apparently a(n) = hypergeometric([-1/5*n, 1/5-1/5*n, 2/5-1/5*n, 3/5-1/5*n, 4/5-1/5*n], [-1/4*n, 1/4-1/4*n, 1/2-1/4*n, 3/4-1/4*n], -5^5/4^4) for n>=16. - Peter Luschny, Sep 18 2014
7*a(n) = A117373(n+4) +5*b(n) +4*b(n-1) +b(n-2) where b(n) = A182097(n). - R. J. Mathar, Aug 07 2017

Extensions

Additional comments from Yong Kong (ykong(AT)curagen.com), Dec 16 2000

A136674 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial p(n,x) with p(0,x) = 1, p(1,x) = 2 - x, p(2,x) = 1 - 4*x + x^2 and p(n,x) = (2-x)*p(n-1,x) - p(n-2,x) if n>2.

Original entry on oeis.org

1, 2, -1, 1, -4, 1, 0, -8, 6, -1, -1, -12, 19, -8, 1, -2, -15, 44, -34, 10, -1, -3, -16, 84, -104, 53, -12, 1, -4, -14, 140, -258, 200, -76, 14, -1, -5, -8, 210, -552, 605, -340, 103, -16, 1, -6, 3, 288, -1056, 1562, -1209, 532, -134, 18, -1, -7, 20, 363, -1848, 3575, -3640, 2170, -784, 169, -20, 1
Offset: 0

Views

Author

Roger L. Bagula, Apr 05 2008

Keywords

Comments

Row sums: A117373(n-1).

Examples

			Triangle begins as:
   1;
   2,  -1;
   1,  -4,   1;
   0,  -8,   6,    -1;
  -1, -12,  19,    -8,    1;
  -2, -15,  44,   -34,   10,    -1;
  -3, -16,  84,  -104,   53,   -12,    1;
  -4, -14, 140,  -258,  200,   -76,   14,   -1;
  -5,  -8, 210,  -552,  605,  -340,  103,  -16,   1;
  -6,   3, 288, -1056, 1562, -1209,  532, -134,  18,  -1;
  -7,  20, 363, -1848, 3575, -3640, 2170, -784, 169, -20, 1;
		

Programs

  • Maple
    A136674aux := proc(n) option remember; if n = 0 then 1; elif n= 1 then 2-x ; elif n= 2 then 1-4*x+x^2 ; else (2-x)*procname(n-1)-procname(n-2) ; end if; end proc:
    A136674 := proc(n,k) coeftayl(A136674aux(n),x=0,k) ; end proc: # R. J. Mathar, Jan 12 2011
  • Mathematica
    (* tridiagonal matrix code*)
    T[n_, m_, d_]:= If[n==m, 2, If[n==d && m==d-1, -3, If[(n==m-1 || n==m+1), -1, 0]]];
    M[d_]:= Table[T[n, m, d], {n,d}, {m,d}];
    Join[{{1}}, Table[CoefficientList[Det[M[d] - x*IdentityMatrix[d]], x], {d, 1, 10}]]//Flatten
    (* polynomial recursion: three initial terms necessary*)
    p[x, 0]:= 1; p[x, 1]:= (2-x); p[x, 2]:= 1 -4*x +x^2;
    p[x_, n_]:= p[x, n]= (2-x)*p[x, n-1] - p[x, n-2];
    Table[ExpandAll[p[x, n]], {n, 0, Length[g] -1}]
    (* Third program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==n, (-1)^n, If[k==0, 3-n, 2*T[n-1, k] -T[n-2, k] -T[n-1, k-1] ]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 12 2020 *)
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==n): return (-1)^n
        elif (k==0): return 3-n
        else: return 2*T(n-1,k) - T(n-2,k) - T(n-1,k-1)
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Mar 12 2020

Formula

T(n,k) = 2*T(n-1,k) - T(n-2,k) - T(n-1,k-1). - R. J. Mathar, Jan 12 2011

A070365 a(n) = 5^n mod 7.

Original entry on oeis.org

1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4, 6, 2
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

From Klaus Brockhaus, May 23 2010: (Start)
Period 6: repeat [1, 5, 4, 6, 2, 3].
Continued fraction expansion of (221+11*sqrt(1086))/490.
Decimal expansion of 199/1287.
First bisection is A153727. (End)

Crossrefs

Cf. A178229 (decimal expansion of (221+11*sqrt(1086))/490), A178141 (repeat 4, -1, 2, -4, 1, -2), A117373 (repeat 1, -2, -3, -1, 2, 3), A153727 (trajectory of 3x+1 sequence starting at 1).

Programs

  • Magma
    [Modexp(5, n, 7): n in [0..100]]; // Vincenzo Librandi, Mar 24 2016 - after Bruno Berselli
  • Maple
    A070365:=n->[1, 5, 4, 6, 2, 3][(n mod 6)+1]: seq(A070365(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
  • Mathematica
    PowerMod[5, Range[0, 110], 7] (* or *) LinearRecurrence[{1, 0, -1, 1}, {1, 5, 4, 6}, 110] (* Harvey P. Dale, Apr 26 2011 *)
    Table[Mod[5^n, 7], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
    PadRight[{}, 100, {1, 5, 4, 6, 2, 3}] (* or *) CoefficientList[Series[(1 + 5 x + 4 x^2 + 6 x^3 + 2 x^4 + 3 x^5) / (1 - x^6), {x, 0, 100}], x] (* Vincenzo Librandi, Mar 24 2016 *)
  • PARI
    a(n)=lift(Mod(5,7)^n) \\ Charles R Greathouse IV, Mar 22 2016
    

Formula

From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
G.f.: (1+4*x-x^2+3*x^3)/ ((1-x)*(1+x)*(x^2-x+1)). (End)
From Klaus Brockhaus, May 23 2010: (Start)
a(n+1)-a(n) = A178141(n).
a(n+2)-a(n) = A117373(n+5). (End)
From G. C. Greubel, Mar 05 2016: (Start)
a(n) = a(n-6) for n>5.
E.g.f.: (1/3)*(7*cosh(x) + 14*sinh(x) + 2*sqrt(3)*exp(x/2)*sin(sqrt(3)*x/2) - 4*exp(x/2)*cos(sqrt(3)*x/2)). (End)
a(n) = (21 - 7*cos(n*Pi) - 8*cos(n*Pi/3) + 4*sqrt(3)*sin(n*Pi/3))/6. - Wesley Ivan Hurt, Jun 23 2016
a(n) = A010876(A000351(n)). - Michel Marcus, Jun 27 2016

A028289 Expansion of (1+x^2+x^3+x^5)/((1-x)(1-x^3)(1-x^4)(1-x^6)).

Original entry on oeis.org

1, 1, 2, 4, 5, 7, 11, 13, 17, 23, 27, 33, 42, 48, 57, 69, 78, 90, 106, 118, 134, 154, 170, 190, 215, 235, 260, 290, 315, 345, 381, 411, 447, 489, 525, 567, 616, 658, 707, 763, 812, 868, 932, 988, 1052, 1124, 1188
Offset: 0

Views

Author

Keywords

Programs

  • Maple
    A117373 := proc(n) op(1+(n mod 6),[1,-2,-3,-1,2,3]) ; end proc:
    A076118 := proc(n) coeftayl( x*(1-x)/(1-x+x^2)^2,x=0,n) ; end proc:
    A028289 := proc(n) 1/108*n^3 +1/8*n^2 +55/108*n +29/48 +1/16*(-1)^n -2*(-1)^n*A117373(n+2)/27 +(-1)^n*A076118(n+1)/9; end proc:
    seq(A028289(n),n=0..20) ; # R. J. Mathar, Mar 22 2011
  • Mathematica
    CoefficientList[Series[(1+x^2+x^3+x^5)/((1-x)(1-x^3)(1-x^4) (1-x^6)),{x,0,50}],x]  (* Harvey P. Dale, Apr 20 2011 *)
  • PARI
    Vec((1+x^2+x^3+x^5)/((1-x)*(1-x^3)*(1-x^4)*(1-x^6))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

G.f.: 1 / ( (1+x)*(1+x+x^2)^2*(x-1)^4 ). - R. J. Mathar, Mar 22 2011

A099559 a(n) = Sum_{k=0..floor(n/5)} C(n-4k,k+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 10, 14, 19, 25, 33, 44, 59, 79, 105, 139, 184, 244, 324, 430, 570, 755, 1000, 1325, 1756, 2327, 3083, 4084, 5410, 7167, 9495, 12579, 16664, 22075, 29243, 38739, 51319, 67984, 90060, 119304, 158044, 209364, 277349, 367410, 486715
Offset: 0

Views

Author

Paul Barry, Oct 22 2004

Keywords

Crossrefs

Cf. A098578.

Programs

  • Mathematica
    LinearRecurrence[{2,-1,0,0,1,-1},{0,1,2,3,4,5},50] (* Harvey P. Dale, Feb 20 2017 *)
  • PARI
    a(n) = sum(k=0,n\5, binomial(n-4*k, k+1)); \\ Michel Marcus, Jul 11 2018

Formula

Partial sums of A003520 (with leading zero).
G.f.: x / ( (x-1)*(x^2-x+1)*(x^3+x^2-1) ).
a(n) = 2a(n-1)-a(n-2)+a(n-5)-a(n-6).
7*a(n) = A117373(n+2) -7 +10*b(n) +15*b(n-1) +9*b(n-2), where b(n) = A182097(n). - R. J. Mathar, Aug 07 2017
a(n) = A003520(n+4) -1. - R. J. Mathar, Aug 07 2017

Extensions

Values from a(5) on corrected by R. J. Mathar, Jul 29 2008

A117372 Riordan array (1-3x,x(1-x)).

Original entry on oeis.org

1, -3, 1, 0, -4, 1, 0, 3, -5, 1, 0, 0, 7, -6, 1, 0, 0, -3, 12, -7, 1, 0, 0, 0, -10, 18, -8, 1, 0, 0, 0, 3, -22, 25, -9, 1, 0, 0, 0, 0, 13, -40, 33, -10, 1, 0, 0, 0, 0, -3, 35, -65, 42, -11, 1, 0, 0, 0, 0, 0, -16, 75, -98, 52, -12, 1
Offset: 0

Views

Author

Paul Barry, Mar 10 2006

Keywords

Comments

Row sums are A117373. Diagonal sums are A117374. Inverse is A117375.

Examples

			Triangle begins
1,
-3, 1,
0, -4, 1,
0, 3, -5, 1,
0, 0, 7, -6, 1,
0, 0, -3, 12, -7, 1,
0, 0, 0, -10, 18, -8, 1,
0, 0, 0, 3, -22, 25, -9, 1
		

Formula

Number triangle T(n,k)=(-1)^(n-k)(C(k,n-k)+3*C(k, n-k-1))

A135350 a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4).

Original entry on oeis.org

0, 1, 3, 8, 15, 29, 56, 113, 227, 456, 911, 1821, 3640, 7281, 14563, 29128, 58255, 116509, 233016, 466033, 932067, 1864136, 3728271, 7456541, 14913080, 29826161, 59652323, 119304648, 238609295, 477218589, 954437176, 1908874353, 3817748707
Offset: 0

Views

Author

Paul Curtz, Feb 16 2008

Keywords

Crossrefs

Cf. A117373.

Programs

  • Maple
    A117373 := proc(n) coeftayl( (1-3*x)/(1-x+x^2),x=0,n) ; end: A135350 := proc(n) 2*(-1)^(n+1)/9+2^(n+3)/9+A117373(n+1)/3 ; end: seq(A135350(n),n=0..10) ; # R. J. Mathar, Feb 19 2008
  • Mathematica
    LinearRecurrence[{2, 0, -1, 2}, {0, 1, 3, 8}, 25] (* G. C. Greubel, Oct 11 2016 *)

Formula

From R. J. Mathar, Feb 19 2008: (Start)
O.g.f.: (1/9)*(-3*(x+2)/(x^2-x+1) - 8/(2*x-1) - 2/(x+1)).
a(n) = (1/9)*(2*(-1)^(n+1) + 2^(n+3) + 3*A117373(n+1)). (End)

Extensions

More terms from R. J. Mathar, Feb 19 2008

A132798 Period 6: repeat [0, 2, 1, 0, -2, -1].

Original entry on oeis.org

0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1, 0, 2, 1, 0, -2, -1
Offset: 0

Views

Author

Paul Curtz, Nov 21 2007

Keywords

Crossrefs

Programs

Formula

G.f.: x*(2+x)/((x+1)*(x^2-x+1)) = (1/3)*(4*x+1)/(x^2-x+1)-(1/3)/(x+1). - R. J. Mathar, Nov 28 2007
a(n) + a(n+1) = A117373(n+4). - R. J. Mathar, Jul 22 2009
a(n) = (-n mod 3) * (-1)^floor(n/3) = A080425(n) * (-1)^A002264(n) = A080425(n) * A130151(n). - Wesley Ivan Hurt, Jun 20 2014
From Wesley Ivan Hurt, Jun 21 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = sin(n*Pi/3) * (3*sqrt(3) + 2*sin(2*n*Pi/3))/3. (End)

A178873 Partial sums of round(5^n/7).

Original entry on oeis.org

0, 1, 5, 23, 112, 558, 2790, 13951, 69755, 348773, 1743862, 8719308, 43596540, 217982701, 1089913505, 5449567523, 27247837612, 136239188058, 681195940290, 3405979701451, 17029898507255, 85149492536273
Offset: 0

Views

Author

Mircea Merca, Dec 28 2010

Keywords

Examples

			a(6) = 0 + 1 + 4 + 18 + 89 + 446 + 2232 = 2790.
		

Programs

  • Magma
    [Floor((5*5^n+19)/28): n in [0..40]]; // Vincenzo Librandi, Apr 28 2011
  • Maple
    A178873 := proc(n) add( round(5^i/7),i=0..n) ; end proc:
  • Mathematica
    Accumulate[Round[5^Range[0,25]/7]] (* Harvey P. Dale, Feb 01 2011 *)

Formula

a(n) = round((5*5^n + 7)/28).
a(n) = floor((5*5^n + 19)/28).
a(n) = ceiling((5*5^n - 5)/28).
a(n) = a(n-6) + 558*5^(n-5), n>5.
a(n) = 5*a(n-1) + a(n-6) - 5*a(n-7), n>6.
a(n) = 7*a(n-1) - 12*a(n-2) + 11*a(n-3) - 5*a(n-4), n>3.
G.f.: -(2*x^2-x)/((x-1)*(5*x-1)*(x^2-x+1)).
a(n) = 5^(n+1)/28 + 1/4 + A117373(n+2)/7 = (5*5^n+7)/28 - ((9-i*sqrt(3))*(1-i*sqrt(3))^n + (9+i*sqrt(3))*(1+i*sqrt(3))^n) / (42*2^n) where i is the imaginary unit. - Bruno Berselli, Jan 12 2011
Showing 1-10 of 12 results. Next