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 10 results.

A369840 Number of compositions of 5*n into parts 2 and 5.

Original entry on oeis.org

1, 1, 2, 7, 23, 68, 194, 555, 1601, 4633, 13404, 38752, 112004, 323728, 935737, 2704817, 7818464, 22599701, 65325542, 188826693, 545813094, 1577700612, 4560424135, 13182138184, 38103641048, 110140512968, 318366757185, 920255312908, 2660044812499, 7688994894381
Offset: 0

Views

Author

Seiichi Manyama, Feb 03 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -9, 10, -5, 1}, {1, 1, 2, 7, 23}, 50] (* Paolo Xausa, Mar 15 2024 *)
  • PARI
    a(n) = sum(k=0, n\2, binomial(n+3*k, n-2*k));

Formula

a(n) = A001687(5*n+1).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+3*k,n-2*k).
a(n) = 5*a(n-1) - 9*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: (1-x)^4/((1-x)^5 - x^2).
a(n) = A369843(n) - A369843(n-1). - R. J. Mathar, Feb 14 2024

A369803 Expansion of 1/(1 - x^2/(1-x)^5).

Original entry on oeis.org

1, 0, 1, 5, 16, 45, 126, 361, 1046, 3032, 8771, 25348, 73252, 211724, 612009, 1769080, 5113647, 14781237, 42725841, 123501151, 356986401, 1031887518, 2982723523, 8621714049, 24921502864, 72036871920, 208226244217, 601888555723, 1739789499591, 5028950081882
Offset: 0

Views

Author

Seiichi Manyama, Feb 01 2024

Keywords

Comments

Number of compositions of 5*n-2 into parts 2 and 5.

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(1/(1-x^2/(1-x)^5))
    
  • PARI
    a(n) = sum(k=0, n\2, binomial(n-1+3*k, n-2*k));

Formula

a(n) = A001687(5*n-1) for n > 0.
a(n) = 5*a(n-1) - 9*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 5.
a(n) = Sum_{k=0..floor(n/2)} binomial(n-1+3*k,n-2*k).
a(n) = A369840(n)-A369840(n-1). - R. J. Mathar, Feb 14 2024

A369842 Number of compositions of 5*n-1 into parts 2 and 5.

Original entry on oeis.org

1, 3, 7, 18, 52, 154, 450, 1301, 3753, 10838, 31327, 90568, 261813, 756786, 2187496, 6323023, 18277014, 52830706, 152709940, 441415867, 1275934888, 3688154521, 10660798289, 30815580241, 89074003241, 257472939209, 744238632362, 2151259638423, 6218325456983
Offset: 1

Views

Author

Seiichi Manyama, Feb 03 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -9, 10, -5, 1}, {1, 3, 7, 18, 52}, 50] (* Paolo Xausa, Mar 15 2024 *)
  • PARI
    a(n) = sum(k=0, n\2, binomial(n+1+3*k, n-1-2*k));

Formula

a(n) = A001687(5*n).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+1+3*k,n-1-2*k).
a(n) = 5*a(n-1) - 9*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x*(1-x)^2/((1-x)^5 - x^2).

A369843 Number of compositions of 5*n-3 into parts 2 and 5.

Original entry on oeis.org

1, 2, 4, 11, 34, 102, 296, 851, 2452, 7085, 20489, 59241, 171245, 494973, 1430710, 4135527, 11953991, 34553692, 99879234, 288705927, 834519021, 2412219633, 6972643768, 20154781952, 58258423000, 168398935968, 486765693153, 1407021006061, 4067065818560
Offset: 1

Views

Author

Seiichi Manyama, Feb 03 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -9, 10, -5, 1}, {1, 2, 4, 11, 34}, 50] (* Paolo Xausa, Mar 15 2024 *)
  • PARI
    a(n) = sum(k=0, n\2, binomial(n+3*k, n-1-2*k));

Formula

a(n) = A001687(5*n-2).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+3*k,n-1-2*k).
a(n) = 5*a(n-1) - 9*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x*(1-x)^3/((1-x)^5 - x^2).

A369844 Number of compositions of 5*n-4 into parts 2 and 5.

Original entry on oeis.org

0, 1, 4, 11, 29, 81, 235, 685, 1986, 5739, 16577, 47904, 138472, 400285, 1157071, 3344567, 9667590, 27944604, 80775310, 233485250, 674901117, 1950836005, 5638990526, 16299788815, 47115369056, 136189372297, 393662311506, 1137900943868, 3289160582291, 9507486039274
Offset: 1

Views

Author

Seiichi Manyama, Feb 03 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -9, 10, -5, 1}, {0, 1, 4, 11, 29}, 50] (* Paolo Xausa, Mar 15 2024 *)
  • PARI
    a(n) = sum(k=0, n\2, binomial(n+1+3*k, n-2-2*k));

Formula

a(n) = A001687(5*n-3).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+1+3*k,n-2-2*k).
a(n) = 5*a(n-1) - 9*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x^2*(1-x)/((1-x)^5 - x^2).

A005686 Number of Twopins positions.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 8, 9, 12, 14, 18, 22, 27, 34, 41, 52, 63, 79, 97, 120, 149, 183, 228, 280, 348, 429, 531, 657, 811, 1005, 1240, 1536, 1897, 2347, 2902, 3587, 4438, 5484, 6785, 8386, 10372, 12824, 15856, 19609, 24242, 29981, 37066, 45837
Offset: 0

Views

Author

Keywords

References

  • R. K. Guy, "Anyone for Twopins?" in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 2-15.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001687.

Programs

  • Magma
    I:=[1,1,1,1,1]; [0] cat [n le 5 select I[n] else Self(n-2)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Jan 19 2016
  • Maple
    A005686 := -(z+1)*(z**3+z+1)/(-1+z**2+z**5); # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence except for the initial 1's
    a := proc(n): if n = 0 then 0 else add(binomial(floor((n+3*k-4)/5), k), k=0..floor((n-1)/2)) fi: end: seq(a(n), n=0..54); # Johannes W. Meijer, Aug 05 2013
  • Mathematica
    nn=54; CoefficientList[Series[(x+x^2)/(1-x^2-x^5),{x,0,nn}],x]  (* Geoffrey Critzer, Apr 28 2013 *)
    m = 5; For[n = 0, n < m, n++, a[n] = 1]; For[n = m, n < 51, n++, a[n] = a[n - m] + a[n - 2]]; Table[a[n], {n, 0, 50}] (*Sergio Falcon, Nov 12 2015 *)
    Join[{0}, LinearRecurrence[{0, 1, 0, 0, 1}, {1, 1, 1, 1, 1}, 60]] (* Vincenzo Librandi, Jan 19 2016 *)
  • PARI
    a(n)=if(n<0,polcoeff((x^3+x^4)/(1+x^3-x^5)+x^-n*O(x),-n),polcoeff((x+x^2)/(1-x^2-x^5)+x^n*O(x),n)) /* Michael Somos, Jul 15 2004 */
    
  • PARI
    a(n)=sum(k=0,(n-1)\2,binomial((n+3*k-4)\5,k))
    

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(floor((n+3k-3)/5), k). - Paul Barry, Jul 10 2004
G.f.: (x+x^2)/(1-x^2-x^5). - Ralf Stephan, Apr 21 2004
a(n) = A001687(n)+A001687(n-1). - Ralf Stephan, Apr 21 2004
a(n) = a(n-2) + a(n-5). - Michael Somos, Jul 15 2004
a(n+1) = Sum_{k=0..floor(n/5)} A065941(n-4*k, n-5*k). - Johannes W. Meijer, Aug 05 2013

Extensions

More terms from Paul Barry, Jul 10 2004

A246690 Number A(n,k) of compositions of n into parts of the k-th list of distinct parts in the order given by A246688; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 1, 0, 1, 1, 5, 0, 1, 0, 1, 1, 0, 2, 0, 8, 1, 1, 0, 1, 0, 1, 0, 3, 0, 13, 0, 1, 0, 1, 0, 1, 1, 1, 4, 1, 21, 1, 1, 0, 1, 1, 0, 1, 2, 0, 6, 0, 34, 0, 1, 0, 1, 1, 2, 0, 1, 3, 0, 9, 0, 55, 1, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 01 2014

Keywords

Comments

The first lists of distinct parts in the order given by A246688 are: 0:[], 1:[1], 2:[2], 3:[1,2], 4:[3], 5:[1,3], 6:[4], 7:[1,4], 8:[2,3], 9:[5], 10:[1,2,3], 11:[1,5], 12:[2,4], 13:[6], 14:[1,2,4], 15:[1,6], 16:[2,5], 17:[3,4], 18:[7], 19:[1,2,5], 20:[1,3,4], ... .

Examples

			Square array A(n,k) begins:
  1, 1, 1,  1, 1,  1, 1,  1, 1, 1,   1, 1, 1, 1,   1, ...
  0, 1, 0,  1, 0,  1, 0,  1, 0, 0,   1, 1, 0, 0,   1, ...
  0, 1, 1,  2, 0,  1, 0,  1, 1, 0,   2, 1, 1, 0,   2, ...
  0, 1, 0,  3, 1,  2, 0,  1, 1, 0,   4, 1, 0, 0,   3, ...
  0, 1, 1,  5, 0,  3, 1,  2, 1, 0,   7, 1, 2, 0,   6, ...
  0, 1, 0,  8, 0,  4, 0,  3, 2, 1,  13, 2, 0, 0,  10, ...
  0, 1, 1, 13, 1,  6, 0,  4, 2, 0,  24, 3, 3, 1,  18, ...
  0, 1, 0, 21, 0,  9, 0,  5, 3, 0,  44, 4, 0, 0,  31, ...
  0, 1, 1, 34, 0, 13, 1,  7, 4, 0,  81, 5, 5, 0,  55, ...
  0, 1, 0, 55, 1, 19, 0, 10, 5, 0, 149, 6, 0, 0,  96, ...
  0, 1, 1, 89, 0, 28, 0, 14, 7, 1, 274, 8, 8, 0, 169, ...
		

Crossrefs

Main diagonal gives A246691.
Cf. A246688, A246720 (the same for partitions).

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    f:= proc() local i, l; i, l:=0, [];
          proc(n) while n>=nops(l)
            do l:=[l[], b(i, 1)[]]; i:=i+1 od; l[n+1]
          end
        end():
    g:= proc(n, l) option remember; `if`(n=0, 1,
          add(`if`(i>n, 0, g(n-i, l)), i=l))
        end:
    A:= (n, k)-> g(n, f(k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i>n, {}, Join[Prepend[#, i]& /@ b[n - i, i + 1], b[n, i + 1]]]];
    f = Module[{i = 0, l = {}}, Function[n, While[n >= Length[l], l = Join[l, b[i, 1]]; i++]; l[[n + 1]]]];
    g[n_, l_] := g[n, l] = If[n==0, 1, Sum[If[i>n, 0, g[n - i, l]], {i, l}]];
    A[n_, k_] := g[n, f[k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 07 2020, after Alois P. Heinz *)

A228571 The backwards antidiagonal sums of triangle A228570.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 5, 4, 7, 6, 10, 10, 14, 15, 20, 24, 30, 35, 45, 53, 69, 79, 104, 120, 157, 184, 236, 281, 356, 431, 540, 656, 821, 1001, 1252, 1525, 1908, 2328, 2909, 3557, 4434, 5436, 6762
Offset: 0

Views

Author

Johannes W. Meijer, Aug 26 2013

Keywords

Comments

The a(n) equal the backwards antidiagonal sums of triangle A228570.

Crossrefs

Programs

  • Maple
    f := x -> (1/((1-x^2-x^5)) + (1+x^2+x^5)/(1-x^4-x^10))/2 : seq(coeff(series(f(x), x, n+1), x, n), n=0..50);  # End first program
    a := proc(n): (A001687(n+1) + x(n) + x(n-2) + x(n-5))/2 end: A001687 := proc(n) option remember: if n=0 then 0 elif n=1 then 1 elif n=2 then 0 elif n=3 then 1 elif n=4 then 0 else procname(n-2) + procname(n-5) fi: end: x := proc(n) local x: if n <0 then return(0) fi: if type(n, even) then A001687((n+2)/2) else 0 fi: end: seq(a(n), n=0..50); # End second program

Formula

a(n) = sum(A228570(n-k, n-2*k), k=0..floor(n/2)).
G.f.: (1/2)*(1/(1-x^2-x^5) + (1+x^2+x^5)/(1-x^4-x^10)).

A376783 Expansion of 1/sqrt((1 - x^2 - x^5)^2 - 4*x^7).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 4, 1, 9, 2, 16, 10, 25, 37, 37, 101, 65, 226, 164, 443, 481, 810, 1325, 1522, 3258, 3251, 7236, 7926, 15010, 20234, 30557, 50234, 64501, 117966, 145557, 263107, 346293, 569726, 835909, 1233943, 1984730, 2740492, 4579704, 6288323, 10311571
Offset: 0

Views

Author

Seiichi Manyama, Oct 04 2024

Keywords

Crossrefs

Programs

  • PARI
    my(N=50, x='x+O('x^N)); Vec(1/sqrt((1-x^2-x^5)^2-4*x^7))
    
  • PARI
    a(n) = sum(k=0, n\5, ((n-3*k)%2==0)*binomial((n-3*k)/2, k)^2);

Formula

G.f.: 1/sqrt((1 - x^2 + x^5)^2 - 4*x^5) = 1/sqrt((1 + x^2 - x^5)^2 - 4*x^2).

A007384 Number of strict 3rd-order maximal independent sets in path graph.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 3, 0, 6, 1, 10, 4, 15, 10, 22, 20, 33, 35, 51, 57, 80, 90, 125, 141, 193, 221, 295, 346, 449, 539, 684, 834, 1045, 1283, 1600, 1967, 2451, 3012, 3752, 4612, 5738, 7063, 8770, 10815, 13403, 16553, 20488, 25323, 31326, 38726
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. Yanco and A. Bagchi, ``K-th order maximal independent sets in path and cycle graphs,'' J. Graph Theory, submitted, 1994.

Crossrefs

Cf. A001687.

Formula

Conjecture: a(n)= 3*a(n-2) -3*a(n-4) +a(n-5) +a(n-6) -2*a(n-7) +a(n-9) with g.f. -x^5/((x^5+x^2-1)*(x-1)^2*(1+x)^2). [From R. J. Mathar, Oct 30 2009]
a(n) = A001687(n + 6) - b(n) where b(2*n+1) = 1 and b(2*n) = n+1. - Sean A. Irvine, Jan 02 2018

Extensions

More terms from Sean A. Irvine, Jan 02 2018
Showing 1-10 of 10 results.