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

A173033 Second diagonal under the main diagonal in A172119 written in a square (see comment).

Original entry on oeis.org

1, 4, 12, 28, 60, 124, 252, 508, 1020, 2044, 4092, 8188, 16380, 32764, 65532, 131068, 262140, 524284, 1048572, 2097148, 4194300, 8388604, 16777212, 33554428, 67108860, 134217724, 268435452, 536870908, 1073741820, 2147483644, 4294967292, 8589934588, 17179869180
Offset: 0

Views

Author

Richard Choulet, Feb 07 2010

Keywords

Comments

The Granvik array of A172119 is here written in "square": 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 :: 1 // 1 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 :: 2 // 1 :: 3 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 :: 4 // 1 :: 4 :: 7 :: 8 :: 8 :: 8 :: 8 :: 8 :: 8 :: 8 // 1 :: 5 :: 12 :: 15 :: 16 :: 16 :: 16 :: 16 :: 16 :: 16 // 1 :: 6 :: 20 :: 28 :: 31 :: 32 :: 32 :: 32 :: 32 :: 32 // 1 :: 7 :: 33 :: 52 :: 60 :: 63 :: 64 :: 64 :: 64 :: 64 // 1 :: 8 :: 54 :: 96 :: 116 :: 124 :: 127 :: 128 :: 128 :: 128 // 1 :: 9 :: 88 :: 177 :: 224 :: 244 :: 252 :: 255 :: 256 :: 256 //
For n>0 a(n) is also the number of ways to place n^2 non-attacking kings on a 2n X 2n toroidal chessboard. - Vaclav Kotesovec, Aug 28 2011
The number of n-step self-avoiding walks on a 2D square lattice where no step is to a lattice point closer to the origin than the current point. - Scott R. Shannon, Dec 15 2023

Examples

			a(3) = 2^5 - 4 = 32 - 4 = 28.
		

Crossrefs

Programs

  • Maple
    taylor(4/(1-2*z)-4/(1-z)+1,z=0,31);
  • Mathematica
    CoefficientList[Series[4 / (1 - 2 x) - 4 / (1 - x) + 1, {x, 0, 60}], x] (* Vincenzo Librandi, May 29 2013 *)
  • PARI
    my(x='x+O('x^50)); Vec(4/(1-2*x)-4/(1-x)+1) \\ Altug Alkan, Nov 02 2015
    
  • Sage
    def a(n): return 1 if 0==n else 2**(n+2) - 4 # Torlach Rush, Jan 09 2025

Formula

G.f.: 4/(1-2*x) - 4/(1-x) + 1.
a(n) = 2^(n+2) - 4 for n>=1, a(0)=1.
a(n) = A028399(n+2), n>0. - R. J. Mathar, Feb 21 2010
a(n) = A240951(n+3) - 4. - Omar E. Pol, Feb 17 2015
a(n) = 2*a(n-1) + 4 for n>1. - J. Conrad, Nov 01 2015
a(n) = 3*a(n-1)-2*a(n-2) for n>2. - Colin Barker, Nov 03 2015
E.g.f.: (1 - 2*exp(x))^2. - Stefano Spezia, May 03 2023

A172316 7th column of the array A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 127, 252, 500, 992, 1968, 3904, 7744, 15361, 30470, 60440, 119888, 237808, 471712, 935680, 1855999, 3681528, 7302616, 14485344, 28732880, 56994048, 113052416, 224248833, 444816138, 882329660
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(3) = binomial(3,3)*2^3 = 8.
a(7) = binomial(7,7)*2^7 - binomial(1,0)*2^0 = 127.
		

Crossrefs

Partial sums of A001592.

Programs

  • Maple
    for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od; k:=6:taylor(1/(1-2*z+z^(k+1)),z=0,30);

Formula

G.f.: 1/(1 - 2*z + z^7).
Recurrence formula: a(n+7) = 2*a(n+6) - a(n).
a(n) = Sum_{j=0..floor(n/(k+1))} ((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j)) with k=6.

A172317 8th column of A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 255, 508, 1012, 2016, 4016, 8000, 15936, 31744, 63233, 125958, 250904, 499792, 995568, 1983136, 3950336, 7868928, 15674623, 31223288, 62195672, 123891552, 246787536, 491591936, 979233536
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(4) = binomial(4,4)*2^4 = 16.
a(9) = binomial(9,9)*2^9 - binomial(2,1)*2^1 = 512 - 4 = 508.
		

Crossrefs

Partial sums of A066178.

Programs

  • Maple
    k:=7:taylor(1/(1-2*z+z^(k+1)),z=0,30); for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od;

Formula

The generating function is f such that: f(z)=1/(1-2*z+z^8). Recurrence relation: a(n+8)=2*a(n+7)-a(n). General term: a(n) = Sum_{j=0..floor(n/(k+1))} ((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j)) with k=7.

A172318 9th column of the array A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 511, 1020, 2036, 4064, 8112, 16192, 32320, 64512, 128768, 257025, 513030, 1024024, 2043984, 4079856, 8143520, 16254720, 32444928, 64761088, 129265151, 258017272, 515010520, 1027977056
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(7)=C(7,7)*2^7=128. a(10)=C(10,10)*2^10-C(2,1)*2^1=1020.
		

Crossrefs

Partial sums of A079262.

Programs

  • Maple
    for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od; k:=8:taylor(1/(1-2*z+z^(k+1)),z=0,30);

Formula

G.f.: 1/(1-2*z+z^9).
a(n) = sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))) with k=8.
Recurrence relation: a(n+9) = 2*a(8) - a(n).

A172319 10th column of A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1023, 2044, 4084, 8160, 16304, 32576, 65088, 130048, 259840, 519168, 1037313, 2072582, 4141080, 8274000, 16531696, 33030816, 65996544, 131863040, 263466240, 526413312, 1051789311
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Crossrefs

Partial sums of A104144.

Programs

  • Maple
    for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od;
  • Mathematica
    LinearRecurrence[{2,0,0,0,0,0,0,0,0,-1},{1,2,4,8,16,32,64,128,256,512},40] (* Harvey P. Dale, Sep 22 2020 *)

Formula

G.f.: 1/(1-2*z+z^10).
a(n)=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))). a(n+10)=2*a(n+9)-a(n).

A172320 11th column of A172119.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2047, 4092, 8180, 16352, 32688, 65344, 130624, 261120, 521984, 1043456, 2085888, 4169729, 8335366, 16662552, 33308752, 66584816, 133104288, 266077952, 531894784, 1063267584
Offset: 0

Views

Author

Richard Choulet, Jan 31 2010

Keywords

Examples

			a(12)=C(12,12)*2^12-C(2,1)*2^1=4092.
		

Crossrefs

Programs

  • Maple
    k:=10:taylor(1/(1-2*z+z^(k+1)),z=0,30); for k from 0 to 20 do for n from 0 to 30 do b(n):=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))):od:k: seq(b(n),n=0..30):od;

Formula

a(n)=sum((-1)^j*binomial(n-k*j,n-(k+1)*j)*2^(n-(k+1)*j),j=0..floor(n/(k+1))) with k=10.
G.f: f(z)=1/(1-2*z+z^(11)).
a(n+11)=2*a(n+10)-a(n).

A051731 Triangle read by rows: T(n, k) = 1 if k divides n, T(n, k) = 0 otherwise, for 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)

Keywords

Comments

T(n, k) is the number of partitions of n into k equal parts. - Omar E. Pol, Apr 21 2018
This triangle is the lower triangular array L in the LU decomposition of the square array A003989. - Peter Bala, Oct 15 2023

Examples

			The triangle T(n, k) begins:
  n\k 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 ...
  1:  1
  2:  1  1
  3:  1  0  1
  4:  1  1  0  1
  5:  1  0  0  0  1
  6:  1  1  1  0  0  1
  7:  1  0  0  0  0  0  1
  8:  1  1  0  1  0  0  0  1
  9:  1  0  1  0  0  0  0  0  1
  10: 1  1  0  0  1  0  0  0  0  1
  11: 1  0  0  0  0  0  0  0  0  0  1
  12: 1  1  1  1  0  1  0  0  0  0  0  1
  13: 1  0  0  0  0  0  0  0  0  0  0  0  1
  14: 1  1  0  0  0  0  1  0  0  0  0  0  0  1
  15: 1  0  1  0  1  0  0  0  0  0  0  0  0  0  1
  ... Reformatted and extended. - _Wolfdieter Lang_, Nov 12 2014
		

Crossrefs

Cf. A000005 (row sums), A032741(n+2) (diagonal sums).
Cf. A243987 (partial sums per row).
Cf. A134546 (A004736 * T, matrix multiplication).
Variants: A113704, A077049, A077051.

Programs

  • Haskell
    a051731 n k = 0 ^ mod n k
    a051731_row n = a051731_tabl !! (n-1)
    a051731_tabl = map (map a000007) a048158_tabl
    -- Reinhard Zumkeller, Aug 13 2013
    
  • Magma
    [0^(n mod k): k in [1..n], n in [1..17]]; // G. C. Greubel, Jun 22 2024
    
  • Maple
    A051731 := proc(n, k) if n mod k = 0 then 1 else 0 end if end proc:
    # R. J. Mathar, Jul 14 2012
  • Mathematica
    Flatten[Table[If[Mod[n, k] == 0, 1, 0], {n, 20}, {k, n}]]
  • PARI
    for(n=1,17,for(k=1,n,print1(!(n%k)", "))) \\ Charles R Greathouse IV, Mar 14 2012
    
  • Python
    from math import isqrt, comb
    def A051731(n): return int(not (a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))%(n-comb(a,2))) # Chai Wah Wu, Nov 13 2024
  • Sage
    A051731_row = lambda n: [int(k.divides(n)) for k in (1..n)]
    for n in (1..17): print(A051731_row(n)) # Peter Luschny, Jan 05 2018
    

Formula

{T(n, k)*k, k=1..n} setminus {0} = divisors(n).
Sum_{k=1..n} T(n, k)*k^i = sigma[i](n), where sigma[i](n) is the sum of the i-th power of the positive divisors of n.
Sum_{k=1..n} T(n, k) = A000005(n).
Sum_{k=1..n} T(n, k)*k = A000203(n).
T(n, k) = T(n-k, k) for k <= n/2, T(n, k) = 0 for n/2 < k <= n-1, T(n, n) = 1.
Rows given by A074854 converted to binary. Example: A074854(4) = 13 = 1101_2; row 4 = 1, 1, 0, 1. - Philippe Deléham, Oct 04 2003
From Paul Barry, Dec 05 2004: (Start)
Binomial transform (product by binomial matrix) is A101508.
Columns have g.f.: x^k/(1-x^(k+1)) (k >= 0). (End)
Matrix inverse of triangle A054525, where A054525(n, k) = MoebiusMu(n/k) if k|n, 0 otherwise. - Paul D. Hanna, Jan 09 2006
From Gary W. Adamson, Apr 15 2007, May 10 2007: (Start)
Equals A129372 * A115361 as infinite lower triangular matrices.
A054525 is the inverse of this triangle (as lower triangular matrix).
This triangle * [1, 2, 3, ...] = sigma(n) (A000203).
This triangle * [1/1, 1/2, 1/3, ...] = sigma(n)/n. (End)
From Reinhard Zumkeller, Nov 01 2009: (Start)
T(n, k) = 0^(n mod k).
T(n, k) = A000007(A048158(n, k)). (End)
From Mats Granvik, Jan 26 2010, Feb 10 2010, Feb 16 2010: (Start)
T(n, k) = A172119(n) mod 2.
T(n, k) = A175105(n) mod 2.
T(n, k) = Sum_{i=1..k-1} (T(n-i, k-1) - T(n-i, k)) for k > 1 and T(n, 1) = 1.
(Jeffrey O. Shallit kindly provided a clarification along with a proof of this formula.) (End)
A049820(n) = number of zeros in n-th row. - Reinhard Zumkeller, Mar 09 2010
The determinant of this matrix where T(n, n) has been swapped with T(1,k) is equal to the n-th term of the Mobius function. - Mats Granvik, Jul 21 2012
T(n, k) = Sum_{y=1..n} Sum_{x=1..n} [GCD((x/y)*(k/n), n) = k]. - Mats Granvik, Dec 17 2023

Extensions

Edited by Peter Luschny, Oct 18 2023

A008937 a(n) = Sum_{k=0..n} T(k) where T(n) are the tribonacci numbers A000073.

Original entry on oeis.org

0, 1, 2, 4, 8, 15, 28, 52, 96, 177, 326, 600, 1104, 2031, 3736, 6872, 12640, 23249, 42762, 78652, 144664, 266079, 489396, 900140, 1655616, 3045153, 5600910, 10301680, 18947744, 34850335, 64099760, 117897840, 216847936, 398845537, 733591314, 1349284788
Offset: 0

Views

Author

N. J. A. Sloane, Alejandro Teruel (teruel(AT)usb.ve)

Keywords

Comments

a(n+1) is the number of n-bit sequences that avoid 1100. - David Callan, Jul 19 2004 [corrected by Kent E. Morrison, Jan 08 2019]. Also the number of n-bit sequences avoiding one of the patterns 1000, 0011, 1110, ... or any binary string of length 4 without overlap at beginning and end. Strings where it is not true are: 1111, 1010, 1001, ... and their bitwise complements. - Alois P. Heinz, Jan 09 2019
Row sums of Riordan array (1/(1-x), x(1+x+x^2)). - Paul Barry, Feb 16 2005
Diagonal sums of Riordan array (1/(1-x)^2, x(1+x)/(1-x)), A104698.
A shifted version of this sequence can be found in Eqs. (4) and (3) on p. 356 of Dunkel (1925) with r = 3. (Equation (3) follows equation (4) in the paper!) The whole paper is a study of the properties of this and other similar sequences indexed by the parameter r. For r = 2, we get a shifted version of A000071. For r = 4, we get a shifted version of A107066. For r = 5, we get a shifted version of A001949. For r = 6, we get a shifted version of A172316. See also the table in A172119. - Petros Hadjicostas, Jun 14 2019
Officially, to match A000073, this should start with a(0)=a(1)=0, a(2)=1. - N. J. A. Sloane, Sep 12 2020
Numbers with tribonacci representation that is a prefix of 100100100100... . - Jeffrey Shallit, Jul 10 2024

Examples

			G.f. = x + 2*x^2 + 4*x^3 + 8*x^4 + 15*x^5 + 28*x^6 + 52*x^7 + 96*x^8 + 177*x^9 + ... [edited by _Petros Hadjicostas_, Jun 12 2019]
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 41.

Crossrefs

Partial sums of A000073. Cf. A000213, A018921, A027084, A077908, A209972.
Row sums of A055216.
Column k = 1 of A140997 and second main diagonal of A140994.

Programs

  • GAP
    a:=[0,1,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Sep 13 2019
  • Haskell
    a008937 n = a008937_list !! n
    a008937_list = tail $ scanl1 (+) a000073_list
    -- Reinhard Zumkeller, Apr 07 2012
    
  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else n eq 3 select 2 else n eq 4 select 4 else 2*Self(n-1)-Self(n-4): n in [1..40] ]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A008937 := proc(n) option remember; if n <= 3 then 2^n else 2*procname(n-1)-procname(n-4) fi; end;
    a:= n-> (Matrix([[1,1,0,0], [1,0,1,0], [1,0,0,0], [1,0,0,1]])^n)[4,1]: seq(a(n), n=0..50); # Alois P. Heinz, Jul 24 2008
  • Mathematica
    CoefficientList[Series[x/(1-2x+x^4), {x, 0, 40}], x]
    Accumulate[LinearRecurrence[{1,1,1},{0,1,1},40]] (* Harvey P. Dale, Dec 04 2017 *)
    LinearRecurrence[{2, 0, 0, -1},{0, 1, 2, 4},40] (* Ray Chandler, Mar 01 2024 *)
  • PARI
    {a(n) = if( n<0, polcoeff( - x^3 / (1 - 2*x^3 + x^4) + x * O(x^-n), -n), polcoeff( x / (1 - 2*x + x^4) + x * O(x^n), n))}; /* Michael Somos, Aug 23 2014 */
    
  • PARI
    a(n) = sum(j=0, n\2, sum(k=0, j, binomial(n-2*j,k+1)*binomial(j,k)*2^k)); \\ Michel Marcus, Sep 08 2017
    
  • SageMath
    def A008937_list(prec):
        P = PowerSeriesRing(ZZ, 'x', prec)
        x = P.gen().O(prec)
        return (x/(1-2*x+x^4)).list()
    A008937_list(40) # G. C. Greubel, Sep 13 2019
    

Formula

a(n) = A018921(n-2) = A027084(n+1) + 1.
a(n) = (A000073(n+2) + A000073(n+4) - 1)/2.
From Mario Catalani (mario.catalani(AT)unito.it), Aug 09 2002: (Start)
G.f.: x/((1-x)*(1-x-x^2-x^3)).
a(n) = 2*a(n-1) - a(n-4), a(0) = 0, a(1) = 1, a(2) = 2, a(3) = 4. (End)
a(n) = 1 + a(n-1) + a(n-2) + a(n-3). E.g., a(11) = 1 + 600 + 326 + 177 = 1104. - Philippe LALLOUET (philip.lallouet(AT)orange.fr), Oct 29 2007
a(n) = term (4,1) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,0; 1,0,0,1]^n. - Alois P. Heinz, Jul 24 2008
a(n) = -A077908(-n-3). - Alois P. Heinz, Jul 24 2008
a(n) = (A000213(n+2) - 1) / 2. - Reinhard Zumkeller, Apr 07 2012
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} binomial(n-2j,k+1) *binomial(j,k)*2^k. - Tony Foster III, Sep 08 2017
a(n) = Sum_{k=0..floor(n/2)} (n-2*k)*hypergeom([-k,-n+2*k+1], [2], 2). - Peter Luschny, Nov 09 2017
a(n) = 2^(n-1)*hypergeom([1-n/4, 1/4-n/4, 3/4-n/4, 1/2-n/4], [1-n/3, 1/3-n/3, 2/3-n/3], 16/27) for n > 0. - Peter Luschny, Aug 20 2020
a(n-1) = T(n) + T(n-3) + T(n-6) + ... + T(2+((n-2) mod 3)), for n >= 4, where T is A000073(n+1). - Jeffrey Shallit, Dec 24 2020

A141021 Pascal-like triangle with index of asymmetry y = 4 and index of obliqueness z = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 16, 1, 1, 2, 4, 8, 16, 32, 1, 1, 2, 4, 8, 16, 33, 63, 1, 1, 2, 4, 8, 16, 33, 67, 124, 1, 1, 2, 4, 8, 16, 33, 67, 136, 244, 1, 1, 2, 4, 8, 16, 33, 67, 136, 276, 480, 1
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jul 11 2008

Keywords

Comments

The triangle here is A141020 with each row reversed.
From Petros Hadjicostas, Jun 16 2019: (Start)
In the attached photograph, we see that the index of asymmetry is denoted by s (rather than y) and the index of obliqueness by e (rather than z).
The general recurrence is G(n+s+2, k) = G(n+1, k-e*s+e-1) + Sum_{1 <= m <= s+1} G(n+m, k-e*s+m*e-2*e) for n >= 0 with k = 1..(n+1) when e = 0 and k = (s+1)..(n+s+1) when e = 1. The initial conditions are G(n+x+1, n-e*n+e*x-e+1) = 2^x for x=0..s and n >= 0. There is one more initial condition, namely, G(n, e*n) = 1 for n >= 0.
For s = 0, we get Pascal's triangle A007318. For s = 1, we get A140998 (e = 0) and A140993 (e = 1). For s = 2, we get A140997 (e = 0) and A140994 (e = 1). For s = 3, we get A140996 (e = 0) and A140995 (e = 1). For s = 4, we have array A141020 (with e = 0) and the current array (with e = 1). In some of these arrays, the indices n and k are sometimes shifted.
Putting k = 1 in Stepan's triangles with index of asymmetry s and index of obliqueness e = 0, we get G(n + s + 2, 1) = 1 + Sum_{1 <= m <= s+1} G(n+m, 1) for n >= 0 and k = 1..(n+1) with initial conditions G(x+1, 1) = 2^x for x = 0..s. Thus, we get a shifted version of column s+1 in array A172119. These sequences were first studied by Dunkel (1925).
Thus, the second main diagonal of Stepan's triangles with index of asymmetry s and index of obliqueness e = 1 is equal to a shifted version of column s + 1 in array A172119.
It follows from Eq. (20) on p. 360 in Dunkel (1925) that, for Stepan's triangles with index of asymmetry s and index of obliqueness e = 0, we have G(n, 1) = Sum_{t = 1..floor((n + s + 1)/(s + 2))} (-1)^(t + 1) * binomial(n + s - t*(s + 1), t - 1) * 2^(n + s - t*(s + 2) + 1) for n >= 0.
In a similar way, for Stepan's triangles with index of asymmetry s and index of obliqueness e = 1, we have G(n, n - 1) = Sum_{t = 1..floor((n + s + 1)/(s + 2))} (-1)^(t + 1) * binomial(n + s - t*(s + 1), t - 1) * 2^(n + s - t*(s + 2) + 1) for n >= 1.
Let A_s(x, y) be the bivariate g.f. of G(n, k) with index of asymmetry s and index of obliqueness e = 0 and let B_s(x, y) be the bivariate g.f. of the other G(n, k) with index of asymmetry s and index of obliqueness e = 1. Because the two triangular arrays are mirror images of each other, we have B_s(x, y) = A_s(x*y, y^(-1)).
(End)

Examples

			Pascal-like triangle with y = 4 and z = 1 (with rows n >= 0 and columns k >= 0) begins as follows:
  1
  1 1
  1 2 1
  1 2 4 1
  1 2 4 8  1
  1 2 4 8 16  1
  1 2 4 8 16 32  1
  1 2 4 8 16 33 63   1
  1 2 4 8 16 33 67 124   1
  1 2 4 8 16 33 67 136 244   1
  1 2 4 8 16 33 67 136 276 480   1
  1 2 4 8 16 33 67 136 276 560 944 1
  ...
		

Crossrefs

Programs

  • Maple
    # This is a slight modification of R. J. Mathar's Maple program from array A141020:
    A141020 := proc(n, k) option remember ; if k<0 or k>n then 0 ; elif k=0 or k=n then 1 ; elif k=n-1 then 2 ; elif k=n-2 then 4 ; elif k=n-3 then 8 ; elif k=n-4 then 16 ; else procname(n-1, k) +procname(n-2, k)+procname(n-3, k)+procname(n-4, k) +procname(n-5, k)+procname(n-5, k-1) ; fi; end:
    A141021 := proc(n, k) A141020(n, n-k): end:
    for n1 from 0 to 20 do for k1 from 0 to n1 do printf("%d, ", A141021(n1, k1)) ; od: od: # Petros Hadjicostas, Jun 16 2019
  • Mathematica
    t[n_, k_] := t[n, k] = Which[k < 0 || k > n, 0, k == 0 || k == n, 1, k == n - 1, 2, k == n - 2, 4, k == n - 3, 8, k == n - 4, 16, True, t[n - 1, k] + t[n - 2, k] + t[n - 3, k] + t[n - 4, k] + t[n - 5, k] + t[n - 5, k - 1]];
    T[n_, k_] := t[n, n - k];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 24 2020 *)

Formula

T(n, k) = A141020(n, n-k). - R. J. Mathar, Sep 19 2008
From Petros Hadjicostas, Jun 16 2019: (Start)
Recurrence: G(n+6, k) = G(n+1, k-4) + G(n+1, k-5) + G(n+2, k-4) + G(n+3, k-3) + G(n+4, k-2) + G(n+5, k-1) for n >= 0 and k = 5..(n+5) with G(n+x+1, x) = 2^x for x = 0..4 and n >= 0.
Bivariate g.f.: Sum_{n,k >=0} T(n, k)*x^n*y^k = (x^6*y^5 - x^5*y^5 - x^4*y^4 + x^4*y^3 - x^3*y^3 + x^3*y^2 - x^2*y^2 + x^2*y - x*y + 1)/((1 - x*y) * (1 - x) * (1 - x*y - x^2*y^2 - x^3*y^3 - x^4*y^4 - x^5*y^4 - x^5*y^5)).
Second main diagonal: G(n, n - 1) = Sum_{t = 1..floor((n + 5)/6)} (-1)^(t + 1) * binomial(n + 4 - 5*t, t - 1) * 2^(n + 5 - 6*t) for n >= 1.
Limiting row: Let b(k) = lim_{n -> infinity} G(n, k) for k >= 0. Then b(k) = b(k-5) + 2*b(k-4) + b(k-3) + b(k-2) + b(k-1) for k >= 5 with b(x) = 2^x for x = 0..4. This is the sequence 1, 2, 4, 8, 16, 33, 67, 136, 276, 561, 1140, 2316, 4705, 9559, 19421, 39457, 80163, 162864, 330885, 672247, ..., which is A308808.
(End)

Extensions

Partially edited by N. J. A. Sloane, Jul 18 2008
Comment simplified by R. J. Mathar, Sep 19 2008
Data corrected by Jean-François Alcover, Apr 24 2020

A107066 Expansion of 1/(1-2*x+x^5).

Original entry on oeis.org

1, 2, 4, 8, 16, 31, 60, 116, 224, 432, 833, 1606, 3096, 5968, 11504, 22175, 42744, 82392, 158816, 306128, 590081, 1137418, 2192444, 4226072, 8146016, 15701951, 30266484, 58340524, 112454976, 216763936, 417825921, 805385358, 1552430192, 2992405408, 5768046880
Offset: 0

Views

Author

Paul Barry, May 10 2005

Keywords

Comments

Row sums of number triangle A107065.
Same as A018922 plus first 3 additional terms. - Vladimir Joseph Stephan Orlovsky, Jul 08 2011
a(n) is the number of binary words of length n containing no subword 01011. - Alois P. Heinz, Mar 14 2012

Examples

			G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 16*x^4 + 31*x^5 + 60*x^6 + 116*x^7 + 224*x^8 + ...
		

Crossrefs

Cf. A018922, A119407 (partial sums), A000078 (first differences).
Cf. A209888. - Alois P. Heinz, Mar 14 2012
Column k = 1 of array A140996 (with a different offset) and second main diagonal of A140995.
Column k = 4 of A172119 (with a different offset).

Programs

  • GAP
    a:=[1,2,4,8,16];; for n in [6..40] do a[n]:=2*a[n-1]-a[n-5]; od; a; # G. C. Greubel, Jun 12 2019
  • Magma
    I:=[1,2,4,8,16]; [n le 5 select I[n] else 2*Self(n-1) - Self(n-5): n in [1..40]]; // G. C. Greubel, Jun 12 2019
    
  • Mathematica
    CoefficientList[Series[1/(1 - 2*z + z^5), {z, 0, 40}], z] (* Vladimir Joseph Stephan Orlovsky, Jul 08 2011 *)
    LinearRecurrence[{2,0,0,0,-1}, {1,2,4,8,16}, 40] (* G. C. Greubel, Jun 12 2019 *)
  • PARI
    {a(n) = if( n<0, n = -n; polcoeff( -x^5 / (1 - 2*x^4 + x^5) + x * O(x^n), n), polcoeff( 1 / (1 - 2*x + x^5) + x * O(x^n), n))} /* Michael Somos, Dec 28 2012 */
    
  • Sage
    (1/(1-2*x+x^5)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
    

Formula

a(n) = 2*a(n-1) - a(n-5).
a(n) = Sum_{k=0..floor(n/5)} C(n-4*k, k) * 2^(n-2*k) *(-1)^k.
a(n) = A018922(n-3) for n >= 3. - R. J. Mathar, Mar 09 2007
First difference of A119407. - Michael Somos, Dec 28 2012
From Petros Hadjicostas, Jun 12 2019: (Start)
G.f.: 1/((1 - x)*(1 - x - x^2 - x^3 - x^4)).
Setting k = 1 in the double recurrence for array A140996, we get that a(n+5) = 1 + a(n+1) + a(n+2) + a(n+3) + a(n+4) for n >= 0, which of course we can prove using other methods as well. See also Dunkel (1925).
(End)
a(n) = Sum_{k=0..n+3} A000078(k). - Greg Dresden, Jan 01 2021
Showing 1-10 of 14 results. Next