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

A005022 Number of walks of length 2n+6 in the path graph P_7 from one end to the other.

Original entry on oeis.org

6, 26, 100, 364, 1288, 4488, 15504, 53296, 182688, 625184, 2137408, 7303360, 24946816, 85196928, 290926848, 993379072, 3391793664, 11580678656, 39539651584, 134998297600, 460915984384, 1573671536640, 5372862566400, 18344123969536, 62630804299776
Offset: 1

Views

Author

Keywords

Examples

			Example: a(1)=6 because in the path ABCDEFG we have ABABCDEFG, ABCBCDEFG, ABCDCDEFG, ABCDEDEFG, ABCDEFEFG and ABCDEFGFG. - _Emeric Deutsch_, Apr 02 2004
		

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 3rd ed, Wiley, New York, 1968, p. 96.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A094811 for another version.

Programs

  • Magma
    I:=[6, 26, 100]; [n le 3 select I[n] else 6*Self(n-1)-10*Self(n-2)+4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 08 2013
    
  • Maple
    a:=k->sum(binomial(6+2*k,8*j+k-2),j=ceil((2-k)/8)..floor((8+k)/8))-sum(binomial(6+2*k,8*j+k-1),j=ceil((1-k)/8)..floor((7+k)/8)): seq(a(k),k=1..28);
    A005022:=-1/((2*z-1)*(2*z**2-4*z+1)) -1; # [Conjectured (correctly) by Simon Plouffe in his 1992 dissertation. Gives sequence with an additional leading term of 1.]
  • Mathematica
    CoefficientList[Series[-(2 (2 z^2 - 5 z + 3))/(4 z^3 - 10 z^2 + 6 z - 1), {z, 0, 100}], z] (* Vladimir Joseph Stephan Orlovsky, Jun 27 2011 *)
    CoefficientList[Series[(1 / x) (1 / (1 - 6 x + 10 x^2 - 4 x^3) - 1), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 08 2013 *)
  • PARI
    Vec(2*(1-x)*(3-2*x) / ((1-2*x)*(1-4*x+2*x^2)) + O(x^50)) \\ Colin Barker, Apr 27 2016

Formula

G.f.: 1/(1-6x+10x^2-4x^3)-1.
a(n) = 6*a(n-1)-10*a(n-2)+4*a(n-3). - Emeric Deutsch, Apr 02 2004
a(k) = sum(binomial(6+2*k, 8*j+k-2)-binomial(6+2*k, 8*j+k-1), j=-infinity..infinity) (a finite sum).
The g.f. x^3/(1-6*x+10*x^2-4*x^3) occurs on page 320 of Viennot, 2002.
a(n) = -2^(1+n)+(3/2-sqrt(2))*(2-sqrt(2))^n+(3/2+sqrt(2))*(2+sqrt(2))^n - Colin Barker, Apr 27 2016
E.g.f.: (-2 + 3*cosh(sqrt(2)*x) + 2*sqrt(2)*sinh(sqrt(2)*x))*exp(2*x) - 1. - Ilya Gutkovskiy, Apr 27 2016

Extensions

Edited by Emeric Deutsch, Apr 28 2004

A217257 Square array T, read by antidiagonals: T(n,k) = 0 if n-k >= 1 or if k-n >= 7, T(0,0) = T(0,1) = T(0,2) = T(0,3) = T(0,3) = T(0,4) = T(0,5) = T(0,6) = 1, T(n,k) = T(n-1,k) + T(n,k-1).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 5, 0, 0, 0, 1, 5, 9, 5, 0, 0, 0, 0, 6, 14, 14, 0, 0, 0, 0, 0, 6, 20, 28, 14, 0, 0, 0, 0, 0, 0, 26, 48, 42, 0, 0, 0, 0, 0, 0, 0, 26, 74, 90, 42, 0, 0, 0, 0, 0, 0, 0, 0, 100, 164, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 264, 296, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 560, 428, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Mar 17 2013

Keywords

Comments

A hexagon arithmetic of E. Lucas.

Examples

			Square array begins:
1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... row n=0
0, 1, 2, 3, 4, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... row n=1
0, 0, 2, 5, 9, 14, 20, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... row n=2
0, 0, 0, 5, 14, 28, 48, 74, 100, 100, 0, 0, 0, 0, 0, 0, 0, ... row n=3
0, 0, 0, 0, 14, 42, 90, 162, 264, 364, 364, 0, 0, 0, 0, 0, ... row n=4
0, 0, 0, 0, 0, 42, 132, 296, 560, 924, 1288, 1288, 0, 0, 0, ... row n=5
...
		

References

  • E. Lucas, Théorie des nombres, A. Blanchard, Paris, 1958, p.89

Crossrefs

Cf. similar sequences: A216230, A216228, A216226, A216238, A216054.

Formula

T(n,n) = A024175(n).
T(n,n+1) = A024175(n+1).
T(n,n+2) = A094803(n+1).
T(n,n+3) = A007070(n).
T(n,n+4) = A094806(n+2).
T(n,n+5) = T(n,n+6) = A094811(n+2).
Sum_{k, 0<=k<=n} T(n-k,k) = A030436(n).

Extensions

a(69) = 0 deleted by Georg Fischer, Oct 16 2021

A259475 Array read by antidiagonals: row n gives coefficients of Taylor series expansion of 1/F_{n+1}(t), where F_i(t) is a Fibonacci polynomial defined by F_0=1, F_1=1, F_{i+1} = F_i-t*F_{i-1}.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 8, 8, 1, 0, 1, 5, 13, 21, 16, 1, 0, 1, 6, 19, 40, 55, 32, 1, 0, 1, 7, 26, 66, 121, 144, 64, 1, 0, 1, 8, 34, 100, 221, 364, 377, 128, 1, 0, 1, 9, 43, 143, 364, 728, 1093, 987, 256, 1, 0, 1, 10, 53, 196, 560, 1288, 2380, 3280, 2584, 512, 1, 0
Offset: 0

Views

Author

N. J. A. Sloane, Jul 03 2015

Keywords

Comments

Table 3.1 in Hopkins thesis is the same below the main diagonal. - F. Chapoton, Sep 04 2025

Examples

			The first few antidiagonals are:
  1;
  1, 0;
  1, 1,  0;
  1, 2,  1,  0;
  1, 3,  4,  1,   0;
  1, 4,  8,  8,   1,   0;
  1, 5, 13, 21,  16,   1,  0;
  1, 6, 19, 40,  55,  32,  1, 0;
  1, 7, 26, 66, 121, 144, 64, 1, 0;
  ...
Square array starts:
  [0] 1, 0,  0,   0,    0,    0,     0,     0,      0,       0,       0, ...
  [1] 1, 1,  1,   1,    1,    1,     1,     1,      1,       1,       1, ...
  [2] 1, 2,  4,   8,   16,   32,    64,   128,    256,     512,    1024, ...
  [3] 1, 3,  8,  21,   55,  144,   377,   987,   2584,    6765,   17711, ...
  [4] 1, 4, 13,  40,  121,  364,  1093,  3280,   9841,   29524,   88573, ...
  [5] 1, 5, 19,  66,  221,  728,  2380,  7753,  25213,   81927,  266110, ...
  [6] 1, 6, 26, 100,  364, 1288,  4488, 15504,  53296,  182688,  625184, ...
  [7] 1, 7, 34, 143,  560, 2108,  7752, 28101, 100947,  360526, 1282735, ...
  [8] 1, 8, 43, 196,  820, 3264, 12597, 47652, 177859,  657800, 2417416, ...
  [9] 1, 9, 53, 260, 1156, 4845, 19551, 76912, 297275, 1134705, 4292145, ...
		

Crossrefs

The initial rows of the array are A000007, A000012, A000079, A001906, A003432, A005021, A094811, A094256.
A(n,n) gives A274969.
Cf. A309896.
A188843 is a variant without the first two rows and the first column, and the antidiagonals read in opposite direction.

Programs

  • Maple
    F:= proc(n) option remember;
          `if`(n<2, 1, expand(F(n-1)-t*F(n-2)))
        end:
    A:= (n, k)-> coeff(series(1/F(n+1), t, k+1), t, k):
    seq(seq(A(d-k, k), k=0..d), d=0..12);  # Alois P. Heinz, Jul 04 2015
  • Mathematica
    F[n_] := F[n] = If[n<2, 1, Expand[F[n-1] - t*F[n-2]]]; A[n_, k_] := SeriesCoefficient[1/F[n+1], { t, 0, k}]; Table[A[d-k, k], {d, 0, 12}, {k, 0, d}] // Flatten (* Jean-François Alcover, Feb 17 2016, after Alois P. Heinz *)
  • Python
    # The lower triangular array computed by F. Chapoton's formula:
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        if k < 0:  return 0
        if k == 0: return 1
        if k == 1: return n
        return (binomial(n + 2*k, k - 2) * (n**2 + 3*n - 2*k + 2)) // (k * (k - 1))
    for n in range(9): print([T(n, k) for k in range(n+1)])  # Peter Luschny, Sep 06 2025
  • SageMath
    @cached_function
    def F(n, k):
        if k <  0: return 0
        if k == 0: return 1
        return sum((-1)^j*binomial(n-1-j,j+1)*F(n,k-2-2*j) for j in (0..(n-2)/2))
    def A(n, k): return F(n+1, 2*k)
    print([A(n-k, k) for n in (0..11) for k in (0..n)]) # Peter Luschny, Aug 21 2019
    

Formula

Let F(n, k) = Sum_{j=0..(n-2)/2} (-1)^j*binomial(n-1-j, j+1)*F(n, k-2-2*j) for k > 0; F(n, 0) = 1 and F(n, k) = 0 if k < 0. Then A(n, k) = F(n+1, 2*k). See [Shibukawa] and A309896. - Peter Luschny, Aug 21 2019
For n >= k >= 2, A(n, k) = binomial(n+2*k,k-2)*(n^2+3*n-2*k+2)/(k*(k-1)). - F. Chapoton, Sep 05 2025

Extensions

More terms from Alois P. Heinz, Jul 04 2015
Showing 1-3 of 3 results.