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-5 of 5 results.

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

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 5, 7, 12, 18, 29, 45, 71, 111, 175, 274, 431, 676, 1062, 1667, 2618, 4110, 6454, 10133, 15911, 24982, 39226, 61590, 96706, 151842, 238415, 374346, 587779, 922899, 1449088, 2275281, 3572527
Offset: 0

Views

Author

Keywords

Comments

Number of compositions of n into parts p where 2 <= p < = 6. [Joerg Arndt, Jun 24 2013]

Crossrefs

First differences of A023437.

Programs

  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-x^2-x^3-x^4-x^5-x^6))); // Vincenzo Librandi, Jun 24 2013
  • Mathematica
    CoefficientList[Series[1 / (1 - x^2 - x^3 - x^4 - x^5 - x^6), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 23 2013 *)
    LinearRecurrence[{0,1,1,1,1,1},{1,0,1,1,2,3},50] (* Harvey P. Dale, Dec 31 2013 *)
  • PARI
    Vec(1/(1-x^2-x^3-x^4-x^5-x^6)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    

Formula

a(n) = a(n-6) + a(n-5) + a(n-4) + a(n-3) + a(n-2). - Jon E. Schoenfield, Aug 07 2006
G.f.: 1 / ( (1+x)*(1-x^5-x^3-x)). a(n)+a(n+1) = A060961(n). - R. J. Mathar, Mar 22 2011

A078802 Triangular array T given by T(n,k) = number of 01-words of length n containing k 1's, no three of which are consecutive.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 0, 1, 4, 6, 2, 0, 1, 5, 10, 7, 1, 0, 1, 6, 15, 16, 6, 0, 0, 1, 7, 21, 30, 19, 3, 0, 0, 1, 8, 28, 50, 45, 16, 1, 0, 0, 1, 9, 36, 77, 90, 51, 10, 0, 0, 0, 1, 10, 45, 112, 161, 126, 45, 4, 0, 0, 0, 1, 11, 55, 156, 266, 266, 141, 30, 1, 0, 0, 0, 1, 12, 66, 210, 414
Offset: 0

Views

Author

Clark Kimberling, Dec 06 2002

Keywords

Comments

The rows of T are essentially the antidiagonals of A027907 (trinomial coefficients). Reversing the rows produces A078803. Row sums: A000073.
Also, the diagonals of T are essentially the rows of A027907, so diagonal sums = 3^n. Antidiagonal sums are essentially A060961 (number of ordered partitions of n into 1's, 3's and 5's). - Gerald McGarvey, May 13 2005

Examples

			T(4,3) = 2 counts 1+0+1+1 and 1+1+0+1. Top of triangle T:
  1;
  1, 1;
  1, 2, 1;
  1, 3, 3, 0;
  1, 4, 6, 2, 0;
		

References

  • Clark Kimberling, Binary words with restricted repetitions and associated compositions of integers, in Applications of Fibonacci Numbers, vol. 10, Proceedings of the Eleventh International Conference on Fibonacci Numbers and Their Applications, William Webb, editor, Congressus Numerantium, Winnipeg, Manitoba 194 (2009) 141-151.

Crossrefs

Cf. A027907, A078803. See A082601 for another version.

Programs

  • Maple
    seq(seq(sum(binomial(n+1-k,k-j)*binomial(k-j,j),j=0..ceil((k-1)/2)),k=0..n),n=0..20); # Dennis P. Walsh, Apr 04 2012
  • Mathematica
    nn=15; a=1+y x+y^2 x^2;f[list_]:=Select[list,#>0&];Map[f,CoefficientList[Series[a/(1-x a),{x,0,nn}],{x,y}]]//Grid (* Geoffrey Critzer, Sep 15 2012 *)

Formula

T(n, k) = T(n-1, k) + T(n-2, k-1) + T(n-3, k-2) with initial values as in first 3 rows.
T(n,k) = Sum_{j=0..ceiling((k-1)/2)} C(n+1-k, k-j)*C(k-j, j). - Dennis P. Walsh, Apr 04 2012
G.f.: (1 + y*x + y^2*x^2)/(1 - (x*(1 + y*x + y^2*x^2))). - Geoffrey Critzer, Sep 15 2012

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 *)

A191238 Triangle T(n,k) = coefficient of x^n in expansion of (x+x^3+x^5)^k.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 2, 0, 1, 1, 0, 3, 0, 1, 0, 3, 0, 4, 0, 1, 0, 0, 6, 0, 5, 0, 1, 0, 2, 0, 10, 0, 6, 0, 1, 0, 0, 7, 0, 15, 0, 7, 0, 1, 0, 1, 0, 16, 0, 21, 0, 8, 0, 1, 0, 0, 6, 0, 30, 0, 28, 0, 9, 0, 1, 0, 0, 0, 19, 0, 50, 0, 36, 0, 10, 0, 1, 0, 0, 3, 0, 45, 0, 77, 0, 45, 0, 11, 0, 1, 0, 0, 0, 16, 0, 90, 0, 112, 0, 55, 0, 12, 0, 1
Offset: 1

Views

Author

Vladimir Kruchinin, May 27 2011

Keywords

Comments

1. Riordan Array (1,x+x^3+x^5) without first column.
2. Riordan Array (1+x^2+x^4,x+x^3+x^5) numbering triangle (0,0).
3. For the g.f. 1/(1-x-x^3-x^5) we have a(n)=sum(k=1..n, T(n,k)) (see A060961).
4. For the e.g.f. exp(1-x-x^3-x^5) we have a(n)=n!*sum(k=1..n, T(n,k)/k!) (see A191237).
5. Bell Polynomial of second kind B(n,k){1,0,6,0,120,0,0,...,0}=n!/k!*T(n,k).
For more formulas see preprints.

Examples

			Triangle begins:
  1,
  0,1,
  1,0,1,
  0,2,0,1,
  1,0,3,0,1,
  0,3,0,4,0,1,
  0,0,6,0,5,0,1,
  0,2,0,10,0,6,0,1,
  0,0,7,0,15,0,7,0,1,
  0,1,0,16,0,21,0,8,0,1
		

Crossrefs

Cf. A060961 (row sums).

Programs

  • Maple
    A191238 := proc(n,k)
        add(binomial(j,((n-k-2*j)/2))*binomial(k,j)*((-1)^(n-k)+1),j=0..k)/2 ;
    end proc:
    seq(seq(A191238(n,m),m=1..n),n=1..10) ;# R. J. Mathar, Dec 16 2015
  • Maxima
    T(n,k):=sum(binomial(j,((n-k-2*j)/2))*binomial(k,j)*((-1)^(n-k)+1),j,0,k)/2;

Formula

T(n,k) = Sum_{j=0..k} binomial(j,((n-k-2*j)/2))*binomial(k,j)*((-1)^(n-k)+1)/2.

A271970 Linear recurrence, with both signature and original terms = 1,0,1,0,1.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 3, 5, 8, 12, 20, 31, 48, 76, 119, 187, 294, 461, 724, 1137, 1785, 2803, 4401, 6910, 10850, 17036, 26749, 42000, 65946, 103545, 162581, 255276, 400821, 629348, 988169, 1551571, 2436195, 3825185, 6006104, 9430468, 14807224, 23249523, 36505176
Offset: 1

Views

Author

Harvey P. Dale, Apr 17 2016

Keywords

Programs

  • Mathematica
    With[{c={1,0,1,0,1}},LinearRecurrence[c,c,100]]

Formula

a(1)=1, a(2)=0, a(3)=1, a(4)=0, a(5)=1, a(n)=a(n-1)+a(n-3)+a(n-5).
G.f.: ( -x*(x-1)*(x^3-x^2-1) ) / ( -1+x+x^3+x^5 ). - R. J. Mathar, Apr 17 2016
a(n) = A060961(n) -A060961(n-2) -2*A060961(n-4). - R. J. Mathar, Apr 17 2016
Showing 1-5 of 5 results.