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

A289207 a(n) = max(0, n-2).

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

Keywords

Comments

This simple sequence is such that there is one and only one array of differences D(n,k) where the first and the second upper subdiagonal is a(n).
The rows of this array are existing sequences of the OEIS, prepended with zeros:
row 0 is A118425,
row 1 is A006478,
row 2 is A001629,
row 3 is A010049,
row 4 is A006367,
row 5 is not in the OEIS.
It can be observed that a(n) is an autosequence of the first kind whose second kind mate is A199969. In addition, the structure of the array D(n,k) shows that the first row is an autosequence.
For n = 1 to 8, rows with only one leading zero are also autosequences.

Examples

			Array of differences begin:
   0,   0,   0,   0,  0,   0,  0,  1,  4, 12, 30, 68, ...
   0,   0,   0,   0,  0,   0,  1,  3,  8, 18, 38, 76, ...
   0,   0,   0,   0,  0,   1,  2,  5, 10, 20, 38, 71, ...
   0,   0,   0,   0,  1,   1,  3,  5, 10, 18, 33, 59, ...
   0,   0,   0,   1,  0,   2,  2,  5,  8, 15, 26, 46, ...
   0,   0,   1,  -1,  2,   0,  3,  3,  7, 11, 20, 34, ...
   0,   1,  -2,   3, -2,   3,  0,  4,  4,  9, 14, 24, ...
   1,  -3,   5,  -5,  5,  -3,  4,  0,  5,  5, 10, 16, ...
  -4,   8, -10,  10, -8,   7, -4,  5,  0,  6,  6, 17, ...
  12, -18,  20, -18, 15, -11,  9, -5,  6,  0,  7,  7, ...
  ...
		

Crossrefs

Essentially the same as A023444. Cf. A001477, A118425, A006478, A001629, A010049, A006367, A199969.

Programs

  • Mathematica
    a[n_] := Max[0, n - 2];
    D[n_, k_] /; k == n + 1 := a[n]; D[n_, k_] /; k == n + 2 := a[n]; D[n_, k_] /; k > n + 2 := D[n, k] = Sum[D[n + 1, j], {j, 0, k - 1}]; D[n_, k_] /; k <= n := D[n, k] = D[n - 1, k + 1] - D[n - 1, k];
    Table[D[n, k], {n, 0, 11}, {k, 0, 11}]

Formula

G.f.: x^3 / (1-x)^2.

A118424 Triangle read by rows: T(n,k) is the number of binary sequences of length n containing k subsequences 001 (n,k>=0).

Original entry on oeis.org

1, 2, 4, 7, 1, 12, 4, 20, 12, 33, 30, 1, 54, 68, 6, 88, 144, 24, 143, 291, 77, 1, 232, 568, 216, 8, 376, 1080, 552, 40, 609, 2012, 1318, 156, 1, 986, 3688, 2988, 520, 10, 1596, 6672, 6504, 1552, 60, 2583, 11941, 13702, 4266, 275, 1, 4180, 21180, 28104, 11000
Offset: 0

Views

Author

Emeric Deutsch, Apr 27 2006

Keywords

Comments

Row n has 1+floor(n/3) terms. Sum of entries in row n is 2^n (A000079). T(n,0)=A000071(n+3)=fibonacci(n+3)-1. T(n,1)=A118425(n). Sum(k*T(n,k),k=0..n-1)=(n-2)*2^(n-3) (A001787).

Examples

			T(7,2) = 6 because we have 0bb, 1bb, b0b, b1b, bb0 and bb1, where b=001.
Triangle starts:
1;
2;
4;
7,   1;
12,  4;
20, 12;
33, 30, 1;
		

Crossrefs

Programs

  • Maple
    G:=1/(1-2*z+(1-t)*z^3): Gser:=simplify(series(G,z=0,20)): P[0]:=1: for n from 1 to 17 do P[n]:=coeff(Gser,z^n) od: for n from 0 to 17 do seq(coeff(P[n],t,j),j=0..floor(n/3)) od; # yields sequence in triangular form
  • Mathematica
    nn=15;Map[Select[#,#>0&]&,CoefficientList[Series[1/(1-2z-(u-1)z^3),{z,0,nn}],{z,u}]]//Grid (* Geoffrey Critzer, Dec 03 2013 *)

Formula

G.f.: G(t,z) = 1/[1-2z+(1-t)z^3]. Recurrence relation: T(n,k) = 2T(n-1,k) -T(n-3,k) +T(n-3,k-1) for n>=3.
Showing 1-2 of 2 results.