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 18 results. Next

A152201 Triangle read by rows, A000012 * A152198.

Original entry on oeis.org

1, 2, 3, 1, 4, 2, 5, 4, 1, 6, 6, 2, 7, 9, 5, 1, 8, 12, 8, 2, 9, 16, 14, 6, 1, 10, 20, 20, 10, 2, 11, 25, 30, 20, 7, 1, 12, 30, 40, 30, 12, 2, 13, 36, 55, 50, 27, 8, 1
Offset: 0

Views

Author

Gary W. Adamson, Nov 29 2008

Keywords

Comments

Row sums = A027383: (1, 2, 4, 6, 10, 14, 22, 30,...).

Examples

			First few rows of the triangle =
1;
2;
3, 1;
4, 2;
5, 4, 1;
6, 6, 2;
7, 9, 5, 1;
8, 12, 8, 2;
9, 16, 14, 6, 1;
10, 10, 20, 20, 2;
11, 25, 30, 20, 7, 1;
12, 30, 40, 30, 12, 2;
13, 36, 55, 50, 27, 8, 1;
...
		

Crossrefs

Formula

A000012 * A152198 = partial sums of A152198 column terms.

A207974 Triangle related to A152198.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 2, 2, 1, 1, 5, 2, 4, 1, 1, 1, 6, 3, 6, 3, 2, 1, 1, 7, 3, 9, 3, 5, 1, 1, 1, 8, 4, 12, 6, 8, 4, 2, 1, 1, 9, 4, 16, 6, 14, 4, 6, 1, 1, 1, 10, 5, 20, 10, 20, 10, 10, 5, 2, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 22 2012

Keywords

Comments

Row sums are A027383(n).
Diagonal sums are alternately A014739(n) and A001911(n+1).
The matrix inverse starts
1;
-1,1;
1,-2,1;
1,-1,-1,1;
-1,2,0,-2,1;
-1,1,2,-2,-1,1;
1,-2,-1,4,-1,-2,1;
1,-1,-3,3,3,-3,-1,1;
-1,2,2,-6,0,6,-2,-2,1;
-1,1,4,-4,-6,6,4,-4,-1,1;
1,-2,-3,8,2,-12,2,8,-3,-2,1;
apparently related to A158854. - R. J. Mathar, Apr 08 2013
From Gheorghe Coserea, Jun 11 2016: (Start)
T(n,k) is the number of terms of the sequence A057890 in the interval [2^n,2^(n+1)-1] having binary weight k+1.
T(n,k) = A007318(n,k) (mod 2) and the number of odd terms in row n of the triangle is 2^A000120(n).
(End)

Examples

			Triangle begins :
n\k  [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]
[0]  1;
[1]  1,  1;
[2]  1,  2,  1;
[3]  1,  3,  1,  1;
[4]  1,  4,  2,  2,  1;
[5]  1,  5,  2,  4,  1,  1;
[6]  1,  6,  3,  6,  3,  2,  1;
[7]  1,  7,  3,  9,  3,  5,  1,  1;
[8]  1,  8,  4,  12, 6,  8,  4,  2,  1;
[9]  1,  9,  4,  16, 6,  14, 4,  6,  1,  1;
[10] ...
		

Crossrefs

Cf. Diagonals : A000012, A000034, A052938, A097362
Related to thickness: A000120, A027383, A057890, A274036.

Programs

  • Maple
    A207974 := proc(n,k)
        if k = 0 then
            1;
        elif k < 0 or k > n then
            0 ;
        else
            procname(n-1,k-1)-(-1)^k*procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Apr 08 2013
  • PARI
    seq(N) = {
      my(t = vector(N+1, n, vector(n, k, k==1 || k == n)));
      for(n = 2, N+1, for (k = 2, n-1,
          t[n][k] = t[n-1][k-1] + (-1)^(k%2)*t[n-1][k]));
      return(t);
    };
    concat(seq(10))  \\ Gheorghe Coserea, Jun 09 2016
    
  • PARI
    P(n) = ((2+x+(n%2)*x^2) * (1+x^2)^(n\2) - 2)/x;
    concat(vector(11, n, Vecrev(P(n-1)))) \\ Gheorghe Coserea, Mar 14 2017

Formula

T(n,k) = T(n-1,k-1) - (-1)^k*T(n-1,k), k>0 ; T(n,0) = 1.
T(2n,2k) = T(2n+1,2k) = binomial(n,k) = A007318(n,k).
T(2n+1,2k+1) = A110813(n,k).
T(2n+2,2k+1) = 2*A135278(n,k).
T(n,2k) + T(n,2k+1) = A152201(n,k).
T(n,2k) = A152198(n,k).
T(n+1,2k+1) = A152201(n,k).
T(n,k) = T(n-2,k-2) + T(n-2,k).
T(2n,n) = A128014(n+1).
T(n,k) = card {p, 2^n <= A057890(p) <= 2^(n+1)-1 and A000120(A057890(p)) = k+1}. - Gheorghe Coserea, Jun 09 2016
P_n(x) = Sum_{k=0..n} T(n,k)*x^k = ((2+x+(n mod 2)*x^2)*(1+x^2)^(n\2) - 2)/x. - Gheorghe Coserea, Mar 14 2017

A134816 Padovan's spiral numbers.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, 616, 816, 1081, 1432, 1897, 2513, 3329, 4410, 5842, 7739, 10252, 13581, 17991, 23833, 31572, 41824, 55405, 73396, 97229, 128801, 170625, 226030, 299426, 396655
Offset: 1

Views

Author

Omar E. Pol, Nov 13 2007

Keywords

Comments

a(n) is the length of the edge of the n-th equilateral triangle in the Padovan triangle spiral.
Partial sums of A000931. - Juri-Stepan Gerasimov, Jul 17 2009
Rising diagonal sums of triangle A152198. - John Molokach, Jul 09 2013
a(n) is the number of pairs of rabbits living at month n with the following rules: a pair of rabbits born in month n begins to procreate in month n + 2, procreates again in month n + 3, and dies at the end of this month (each pair therefore gives birth to 2 pairs); the first pair is born in month 1. - Robert FERREOL, Oct 16 2017

Examples

			a(6)=3 because 6+4=10 and A000931(10)=3.
G.f. = x + x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 4*x^7 + 5*x^8 + 7*x^9 + ... - _Michael Somos_, Jan 01 2019
		

Crossrefs

The following are basically all variants of the same sequence: A000931, A078027, A096231, A124745, A133034, A134816, A164001, A182097, A228361 and probably A020720. However, each one has its own special features and deserves its own entry.
Cf. A060006.

Programs

  • GAP
    a:=[1,1,1];; for n in [4..50] do a[n]:=a[n-2]+a[n-3]; od; a; # Muniru A Asiru, Aug 12 2018
    
  • Maple
    a:=proc(n, p, q) option remember:
    if n<=p then 1
    elif n<=q then a(n-1, p, q)+a(n-p, p, q)
    else add(a(n-k, p, q), k=p..q) fi end:
    seq(a(n, 2, 3), n=0..100); # Robert FERREOL, Oct 16 2017
  • Mathematica
    Drop[ CoefficientList[ Series[(1 - x^2)/(1 - x^2 - x^3), {x, 0, 52}], x], 5] (* Robert G. Wilson v, Sep 30 2009 *)
    a[n_]=Round[Root[23#^3-5#-1&,1]Root[#^3-#-1&,1]^n ];a[Range[100]] (* OR *)
    LinearRecurrence[{0, 1, 1}, {1, 1, 1}, 100] (* Federico Provvedi, Feb 12 2025 *)
  • PARI
    {a(n) = if( n>=0, polcoeff( (x + x^2) / (1 - x^2 - x^3) + x * O(x^n), n), polcoeff( (x + x^2) / (1 + x - x^3) + x * O(x^-n), -n))}; /* Michael Somos, Jan 01 2019 */
    
  • PARI
    my(x='x+O('x^50)); Vec(x*(1+x)/(1-x^2-x^3)) \\ Joerg Arndt, Feb 07 2025

Formula

a(n) = A000931(n+4).
G.f.: x * (1 + x) / (1 - x^2 - x^3) = x / (1 - x / (1 - x^2 / (1 + x / (1 - x / (1 + x))))). - Michael Somos, Jan 03 2013
a(1)=a(2)=a(3)=1, a(n) = a(n-2) + a(n-3) for n > 3. - Robert FERREOL, Oct 16 2017
a(n) = round(x*rho^n), where the Silver constant rho = Limit_{n->oo} a(n+1)/a(n) = A060006, and x is the real solution of the cubic 23*x^3-5*x-1 = 0. - Federico Provvedi, Feb 12 2025

Extensions

More terms from Robert G. Wilson v, Sep 30 2009
First comment clarified by Omar E. Pol, Aug 12 2018

A152815 Triangle T(n,k), read by rows given by [1,0,-1,0,0,0,0,0,0,...] DELTA [0,1,-1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2, 1, 0, 0, 0, 1, 3, 3, 1, 0, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0, 1, 4, 6, 4, 1, 0, 0, 0, 0, 1, 4, 6, 4, 1, 0, 0, 0, 0, 0, 1, 5, 10, 10, 5, 1, 0, 0, 0, 0, 0, 1, 5, 10, 10, 5, 1, 0, 0, 0, 0, 0, 0, 1, 6, 15, 20, 15, 6, 1, 0, 0, 0, 0, 0, 0, 1, 6, 15, 20, 15, 6, 1, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Dec 13 2008

Keywords

Comments

Triangle read by rows, Pascal's triangle (A007318) rows repeated.
Riordan array (1/(1-x), x^2/(1-x^2)). - Philippe Deléham, Feb 27 2012

Examples

			Triangle begins:
  1;
  1, 0;
  1, 1, 0;
  1, 1, 0, 0;
  1, 2, 1, 0, 0;
  1, 2, 1, 0, 0, 0;
  1, 3, 3, 1, 0, 0, 0;
  1, 3, 3, 1, 0, 0, 0, 0;
  1, 4, 6, 4, 1, 0, 0, 0, 0; ...
		

Crossrefs

Cf. A007318, A064861, A152198 (another version), A000931 (diagonal sums), A016116 (row sums).

Programs

  • Haskell
    a152815 n k = a152815_tabl !! n !! k
    a152815_row n = a152815_tabl !! n
    a152815_tabl = [1] : [1,0] : t [1,0] where
       t ys = zs : zs' : t zs' where
         zs' = zs ++ [0]; zs = zipWith (+) ([0] ++ ys) (ys ++ [0])
    -- Reinhard Zumkeller, Feb 28 2012
    
  • Mathematica
    m = 13;
    (* DELTA is defined in A084938 *)
    DELTA[Join[{1, 0, -1}, Table[0, {m}]], Join[{0, 1, -1}, Table[0, {m}]], m] // Flatten (* Jean-François Alcover, Feb 19 2020 *)
    T[n_, k_] := If[n<0, 0, Binomial[Floor[n/2], k]]; (* Michael Somos, Oct 01 2022 *)
  • PARI
    {T(n, k) = if(n<0, 0, binomial(n\2, k))}; /* Michael Somos, Oct 01 2022 */

Formula

T(n,k) = T(n-1,k) + ((1+(-1)^n)/2)*T(n-1,k-1).
G.f.: (1+x)/(1-(1+y)*x^2).
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A016116(n), A108411(n), A213173(n), A074872(n+1) for x = 0,1,2,3,4 respectively. - Philippe Deléham, Nov 26 2011, Apr 22 2013

Extensions

Example corrected by Philippe Deléham, Dec 13 2008

A051163 Sequence is defined by property that (a0,a1,a2,a3,...) = binomial transform of (a0,a0,a1,a1,a2,a2,a3,a3,...).

Original entry on oeis.org

1, 2, 5, 12, 30, 76, 194, 496, 1269, 3250, 8337, 21428, 55184, 142376, 367916, 952000, 2466014, 6393372, 16586678, 43054344, 111801908, 290412296, 754543052, 1960808160, 5096293794, 13247503540, 34440553562, 89549255592, 232868582328, 605646682144
Offset: 0

Views

Author

Keywords

Comments

Equals the self-convolution of A027826. Also equals antidiagonal sums of symmetric square array A100936. - Paul D. Hanna, Nov 22 2004
Equals eigensequence of triangle A152198. - Gary W. Adamson, Nov 28 2008

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; add(`if`(k<2, 1,
          a(iquo(k, 2)))*binomial(n, k), k=0..n)
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 08 2015
  • Mathematica
    a[n_] := a[n] = 1 + Sum[Binomial[k, j]*Binomial[n-k, j]*a[j], {k, 1, n}, {j, 0, n-k}]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 11 2015 *)
  • PARI
    a(n)=1+sum(k=1,n,sum(j=0,n-k,binomial(k,j)*binomial(n-k,j)*a(j)))
    
  • PARI
    a(n)=local(A,m); if(n<0,0,m=1; A=1+O(x); while(m<=n,m*=2; A=subst(A,x,(x/(1-x))^2)/(1-x)); polcoeff(A^2,n))
    for(n=0,40,print1(a(n),", ")) \\ Paul D. Hanna, Nov 22 2004

Formula

a(n) = 1 + Sum_{k=1..n} Sum_{j=0..n-k} C(k, j)*C(n-k, j)*a(j). - Paul D. Hanna, Nov 22 2004
G.f. A(x) satisfies: A(x) = A(x^2/(1-x)^2)/(1-x)^2 and A(x^2) = A(x/(1+x))/(1+x)^2. - Paul D. Hanna, Nov 22 2004
a(0) = 1; a(n) = Sum_{k=0..floor(n/2)} binomial(n+1,2*k+1) * a(k). - Ilya Gutkovskiy, Apr 07 2022

Extensions

More terms from Vladeta Jovovic, Jul 26 2002

A152828 Triangle read by rows, A007318 rows repeated three times .

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 4, 6, 4, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 5, 10, 10, 5, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 20, 15, 6, 1, 1, 6, 15, 20, 15, 6, 1, 1, 6, 15, 20, 15, 6, 1, 1, 7, 21, 35, 35, 21, 7, 1, 1, 7, 21
Offset: 0

Views

Author

Philippe Deléham, Dec 13 2008

Keywords

Comments

Diagonal sums : A079398 . Lengths of row are : 1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,... (A008620) .

Examples

			Triangle begins : 1 ; 1 ; 1 ; 1,1 ; 1,1 ; 1,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,3,3,1 ; 1,3,3,1 ; 1,3,3,1 ; 1,4,6,4,1 ; ...
		

Crossrefs

Programs

  • Mathematica
    {#,#,#}&/@Table[Binomial[n,k],{n,0,11},{k,0,n}]//Flatten (* Harvey P. Dale, Jul 22 2024 *)

A152830 Triangle read by rows, A007318 rows repeated four times .

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 4, 6, 4, 1, 1, 4, 6, 4, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 5, 10, 10, 5, 1, 1, 5, 10, 10, 5, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 20, 15, 6, 1, 1, 6, 15, 20, 15, 6, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 13 2008

Keywords

Comments

Diagonal sums : A103372 .

Examples

			Triangle begins : 1 ; 1 ; 1 ; 1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,3,3,1 ; ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[#,{4}]&/@Table[Binomial[n,k],{n,0,6},{k,0,n}]] (* Harvey P. Dale, Sep 23 2015 *)

A152831 Triangle read by rows, A007318 repeated five times .

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Dec 13 2008

Keywords

Comments

Diagonal sums : A103373 .

Examples

			Triangle begins : 1 ; 1 ; 1 ; 1 ; 1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,3,3,1 ; ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[#, {5}] & /@ Table[Binomial[n, k], {n,0,10}, {k, 0, n}]] (* G. C. Greubel, May 03 2017 *)

A152844 Triangle read by rows, A007318 rows repeated six times .

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Dec 14 2008

Keywords

Comments

Diagonal sums : A103374 .

Examples

			Triangle begins : 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,3,3,1 ; ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[#, {6}] & /@ Table[Binomial[n, k], {n,0,10}, {k, 0, n}]] (* G. C. Greubel, May 03 2017 *)

A152845 Triangle read by rows, A007318 rows repeated seven times .

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Dec 14 2008

Keywords

Comments

Diagonal sums : A103375 .

Examples

			Triangle begins : 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,2,1 ; 1,3,3,1 ; ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[#, {7}] & /@ Table[Binomial[n, k], {n, 0, 10}, {k, 0, n}]] (* G. C. Greubel, May 03 2017 *)
Showing 1-10 of 18 results. Next