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

A078121 Infinite lower triangular matrix, M, that satisfies [M^2](i,j) = M(i+1,j+1) for all i,j>=0 where [M^n](i,j) denotes the element at row i, column j, of the n-th power of matrix M, with M(0,k)=1 and M(k,k)=1 for all k>=0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 10, 16, 8, 1, 1, 36, 84, 64, 16, 1, 1, 202, 656, 680, 256, 32, 1, 1, 1828, 8148, 10816, 5456, 1024, 64, 1, 1, 27338, 167568, 274856, 174336, 43680, 4096, 128, 1, 1, 692004, 5866452, 11622976, 8909648, 2794496, 349504, 16384, 256, 1
Offset: 0

Views

Author

Paul D. Hanna, Nov 18 2002

Keywords

Comments

M also satisfies: [M^(2k)](i,j) = [M^k](i+1,j+1) for all i,j,k>=0; thus [M^(2^n)](i,j) = M(i+n,j+n) for all n>=0.

Examples

			The square of the matrix is the same matrix excluding the first row and column:
  [1, 0, 0, 0, 0]^2 = [ 1, 0, 0, 0, 0]
  [1, 1, 0, 0, 0]     [ 2, 1, 0, 0, 0]
  [1, 2, 1, 0, 0]     [ 4, 4, 1, 0, 0]
  [1, 4, 4, 1, 0]     [10,16, 8, 1, 0]
  [1,10,16, 8, 1]     [36,84,64,16, 1]
		

Crossrefs

Programs

  • Maple
    M:= proc(i, j) option remember; `if`(j=0 or i=j, 1,
           add(M(i-1, k)*M(k, j-1), k=0..i-1))
        end:
    seq(seq(M(n,k), k=0..n), n=0..10);  # Alois P. Heinz, Feb 27 2015
  • Mathematica
    rows = 10; M[k_] := Table[ Which[j == 1, 1, i == j, 1, 1 < j < i, m[i, j], True, 0], {i, 1, k}, {j, 1, k}]; m2[i_, j_] := m[i+1, j+1]; M2[k_] := Table[ Which[jJean-François Alcover, Feb 27 2015 *)
    M[i_, j_] := M[i, j] = If[j == 0 || i == j, 1, Sum[M[i-1, k]*M[k, j-1], {k, 0, i-1}]]; Table[Table[M[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 27 2015, after Alois P. Heinz *)
  • PARI
    rows_upto(n) = my(A, v1); v1 = vector(n+1, i, vector(i, j, 0)); v1[1][1] = 1; for(i=1, n, v1[i+1][1] = 1; v1[i+1][i+1] = 1); for(i=2, n, for(j=1, i-1, A = (i+j+1)%2; v1[i+1][j+1] = 2*sum(k=0, (i-j-1)\2, v1[i-j+1][2*k+A+1]*v1[j+2*k+A+1][j]))); v1 \\ Mikhail Kurkov, Aug 27 2025

Formula

M(1,j) = A002577(j) (partitions of 2^j into powers of 2), M(j+1,j) = 2^j, M(j+2,j) = 4^j, M(j+3,j) = A016131(j).
M(n,k) = the coefficient of x^(2^n - 2^(n-k)) in the power series expansion of 1/Product_{j=0..n-k} (1-x^(2^j)) whenever 0<=k0 (conjecture).
M(n,k) = Sum_{j=0..n-k-1} M(n-k,j)*M(k+j,k-1)*(1+(-1)^(n+k+j+1)) for 0 < k < n with M(n,0) = M(n,n) = 1. - Mikhail Kurkov, Jun 01 2025
From Mikhail Kurkov, Jul 01 2025: (Start)
Conjecture 1: let R(n,x) be the n-th row polynomial, then R(n,x) = x*R(n-1,x) + Sum_{k=1..n-1} M(n-1,k-1)*R(k,x)*(-1)^(n+k+1) = R(n-1,x) + x*Sum_{k=1..n-1} (M(n-1,k) - M(n-2,k))*R(k,x) for n > 1 with R(0,x) = 1, R(1,x) = x + 1.
Conjecture 2: M(n+m,n) ~ 2^(m*(2*n+m-1)/2)/m! as n -> oo. More generally, it also looks like that M(n+m,n) for m > 0 can be represented as (Sum_{j=0..flooor((m-1)/2)} 2^((m-2*j)*(2*(n-j)+m-1)/2)*P(m,j)*(-1)^j)/m! where P(m,j) are some positive integer coefficients. (End)

A016140 Expansion of 1/((1-3*x)*(1-8*x)).

Original entry on oeis.org

1, 11, 97, 803, 6505, 52283, 418993, 3354131, 26839609, 214736555, 1717951489, 13743789059, 109950843913, 879608345627, 7036871547985, 56294986732787, 450359936909017, 3602879624412299, 28823037382718881, 230584300224012515, 1844674405278884521, 14757395252691429371, 118059162052912494577, 944473296517443135443
Offset: 0

Views

Author

Keywords

Comments

In general, for expansion of 1/((1-b*x)*(1-c*x)): a(n) = (c^(n+1) - b^(n+1))/(c-b) = (b+c)*a(n-1) - b*c*a(n-2) = b*a(n-1) + c^n = c*a(n-1) + b^n = Sum_{i=0..n} b^i*c^(n-i). - Henry Bottomley, Jul 20 2000
8*a(n) gives the number of edges in the n-th-order Sierpiński carpet graph. - Eric W. Weisstein, Aug 19 2013

Crossrefs

Sequences with g.f. 1/((1-n*x)*(1-8*x)): A001018 (n=0), A023001 (n=1), A016131 (n=2), this sequence (n=3), A016152 (n=4), A016162 (n=5), A016170 (n=6), A016177 (n=7), A053539 (n=8), A016185 (n=9), A016186 (n=10), A016187 (n=11), A016188 (n=12), A060195 (n=16).
Cf. A190543.

Programs

Formula

a(n) = (8^(n+1) - 3^(n+1))/5.
a(n) = 11*a(n-1) - 24*a(n-2).
a(n) = 3*a(n-1) + 8^n.
a(n) = 8*a(n-1) + 3^n.
a(n) = Sum_{i=0..n} 3^i*8^(n-i).
E.g.f.: (1/5)*(8*exp(8*x) - 3*exp(3*x)). - G. C. Greubel, Nov 14 2024

A016133 Expansion of 1/((1-2*x)*(1-9*x)).

Original entry on oeis.org

1, 11, 103, 935, 8431, 75911, 683263, 6149495, 55345711, 498111911, 4483008223, 40347076055, 363123688591, 3268113205511, 29413018865983, 264717169826615, 2382454528505071, 21442090756676711, 192978816810352543, 1736809351293697175, 15631284161644323151
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A016204 (partial sums); A191465 (this sequence times 7).

Programs

  • Magma
    [+9^(n+1)/7 -2^(n+1)/7 : n in [0..20]]; // Vincenzo Librandi, Aug 14 2011
    
  • Mathematica
    CoefficientList[Series[1/((1-2x)(1-9x)),{x,0,30}],x] (* or *) LinearRecurrence[ {11,-18},{1,11},30] (* Harvey P. Dale, Apr 19 2020 *)
  • PARI
    Vec(1/((1-2*x)*(1-9*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
  • Sage
    [lucas_number1(n,11,18) for n in range(1, 20)] # Zerinvary Lajos, Apr 27 2009
    

Formula

a(n) = 11*a(n-1) - 18*a(n-2).
a(n) = a(n) = 9*a(n-1) + 2^n. - Paul Curtz, Feb 14 2008
E.g.f.: exp(2*x)*(9*exp(7*x) - 2)/7. - Stefano Spezia, Jul 30 2022

A016311 Expansion of 1/((1-2*x)*(1-7*x)*(1-8*x)).

Original entry on oeis.org

1, 17, 203, 2101, 20163, 184821, 1643251, 14298917, 122461955, 1036190485, 8684988819, 72248167173, 597363137827, 4914549713909, 40265910006707, 328773866154469, 2676717032006979, 21739418975585493
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A016130, A016131. - Zerinvary Lajos, Jun 05 2009

Programs

  • Magma
    [(160*8^n-147*7^n+2*2^n)/15: n in [0..20]]; // Vincenzo Librandi, Sep 02 2011
  • Mathematica
    CoefficientList[Series[1/((1-2x)(1-7x)(1-8x)),{x,0,30}],x] (* or *) LinearRecurrence[{17,-86,112},{1,17,203},30] (* Harvey P. Dale, Jul 12 2012 *)
  • Sage
    [(8^n - 2^n)/6-(7^n - 2^n)/5 for n in range(2,21)] # Zerinvary Lajos, Jun 05 2009
    

Formula

a(n) = A016131(n+1) - A016130(n+1). - Zerinvary Lajos, Jun 05 2009
a(n) = 4*8^(n+1)/3 - 7^(n+2)/5 + 2^(n+1)/15. - R. J. Mathar, Mar 14 2011
From Vincenzo Librandi, Sep 02 2011: (Start)
a(n) = (160*8^n - 147*7^n + 2*2^n)/15;
a(n) = 15*a(n-1) - 56*a(n-2) + 2^n. (End)
a(n) = 17*a(n-1) - 86*a(n-2) + 112*a(n-3), with a(0)=1, a(1)=17, a(2)=203. - Harvey P. Dale, Jul 12 2012

A016316 Expansion of 1/((1-2x)*(1-8x)*(1-9x)).

Original entry on oeis.org

1, 19, 255, 2975, 32231, 333759, 3353335, 32976175, 319155111, 3051352799, 28893830615, 271497720975, 2535105456391, 23548956856639, 217804673719095, 2007154559579375, 18439691005140071, 168959618797797279, 1544655767192730775, 14094055488835543375
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,19,255]; [n le 3 select I[n] else 19*Self(n-1)-106*Self(n-2)+144*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jun 26 2013
    
  • Magma
    m:=20; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-2*x)*(1-8*x)*(1-9*x)))); // Vincenzo Librandi, Jun 26 2013
  • Mathematica
    CoefficientList[Series[1 / ((1 - 2 x) (1 - 8 x) (1 - 9 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jun 26 2013 *)
    LinearRecurrence[{19,-106,144},{1,19,255},30] (* Harvey P. Dale, Dec 29 2021 *)
  • PARI
    a(n)=(9^n-2^n)/7-(8^n-2^n)/6 \\ Charles R Greathouse IV, Sep 24 2012
    
  • Sage
    [(9^n - 2^n)/7-(8^n - 2^n)/6 for n in range(2,20)] # Zerinvary Lajos, Jun 05 2009
    

Formula

a(n) = 2^(n+1)/21 - 4*8^(n+1)/3 + 9^(n+2)/7; a(n) = A016133(n+1) - A016131(n+1). - Zerinvary Lajos, Jun 05 2009 [corrected by R. J. Mathar, Mar 14 2011]
From Vincenzo Librandi, Jun 26 2013: (Start)
a(n) = 19*a(n-1) - 106*a(n-2) + 144*a(n-3).
a(n) = 17*a(n-1) - 72*a(n-2) + 2^n. (End)
E.g.f.: exp(2*x)*(2 - 224*exp(6*x) + 243*exp(7*x))/21. - Stefano Spezia, Jul 30 2022

A248217 a(n) = 8^n - 2^n.

Original entry on oeis.org

0, 6, 60, 504, 4080, 32736, 262080, 2097024, 16776960, 134217216, 1073740800, 8589932544, 68719472640, 549755805696, 4398046494720, 35184372056064, 281474976645120, 2251799813554176, 18014398509219840, 144115188075331584, 1152921504605798400
Offset: 0

Views

Author

Vincenzo Librandi, Oct 04 2014

Keywords

Comments

If 2^(n+1) is the length of the even leg of a primitive Pythagorean triangle (PPT) then it constrains the odd leg to have a length of 4^n-1 and the hypotenuse to have a length of 4^n+1. The resulting triangle has a semiperimeter of 4^n+2^n, an area of 8^n-2^n and an inradius of 2^n-1. For n > 0, a(n) is the area of such triangles. - Frank M Jackson, Sep 07 2018
Maximum anomalous cancellation multiplicity of (2n+1)-digit integers: number of (2n+1)-digit integers which can be anomalously canceled with a fixed (2n+1)-digit integer. The maximum is obtained at 88...88911...11 containing n 8's and n 1's (see Example below). Anomalous cancellation is a "canceling" of digits of a and b in the numerator and denominator of a fraction a/b which results in a fraction equal to the original, and no 0 or digits that appear different times in a and b are canceled. For example, 49/98 = 4/8, 138/184 = 3/4, 1985/5955 = 185/555, 88911/43956 = 8811/4356, but 120/340 is not because canceling the 0's is not an anomalous cancellation. - Xiaohan Zhang, Nov 21 2019

Examples

			For n=1, there are 6 numbers with 3 digits that can be anomalously canceled with 891: 297, 396, 495, 594, 693, 792. For n=2 there are 60 numbers with 88911: 12987, 13986, 14985, 15984, 16983, 17982, 21978, 22977, 23976, 24975, 25974, 26973, 27972, 28971, 31968, 32967, 33966, 34965, 35964, 36963, 37962, 38961, 41958, 42957, 43956, 44955, 45954, 46953, 47952, 48951, 51948, 52947, 53946, 54945, 55944, 56943, 57942, 58941, 61938, 62937, 63936, 64935, 65934, 66933, 67932, 68931, 71928, 72927, 73926, 74925, 75924, 76923, 77922, 78921, 82917, 83916, 84915, 85914, 86913, 87912. For n=3 504 numbers with 8889111, and no other (2n+1)-digit number has greater multiplicity. There seems to be a pattern of integer partitions in these examples, because the sum of the digits of numbers above are all multiples of 9. - _Xiaohan Zhang_, Nov 21 2019
		

Crossrefs

Cf. similar sequences listed in A248216.

Programs

  • Magma
    [8^n-2^n: n in [0..25]];
    
  • Mathematica
    Table[8^n - 2^n, {n, 0, 25}] (* or *) CoefficientList[Series[6 x /((1 - 2 x) (1 - 8 x)), {x, 0, 30}], x]
    LinearRecurrence[{10,-16},{0,6},30] (* Harvey P. Dale, Mar 29 2015 *)
  • PARI
    a(n) = 8^n-2^n; \\ Altug Alkan, Sep 07 2018
    
  • Python
    def A248217(n): return 6*binomial(pow(2,n) +1, 3)
    print([A248217(n) for n in range(41)]) # G. C. Greubel, Dec 26 2024

Formula

G.f.: 6*x/((1-2*x)*(1-8*x)).
a(n) = 10*a(n-1) - 16*a(n-2).
a(n) = 2^n*(4^n-1) = A000079(n) * A024036(n) = A001018(n) - A000079(n).
E.g.f.: exp(2*x)*(-1 + exp(6*x)). - Stefano Spezia, Sep 07 2018
a(n) = 6*A016131(n-1). - R. J. Mathar, Mar 10 2022

A120689 a(n) = 10*a(n-1) - 16*a(n-2), with a(0) = 0 and a(1) = 3.

Original entry on oeis.org

0, 3, 30, 252, 2040, 16368, 131040, 1048512, 8388480, 67108608, 536870400, 4294966272, 34359736320, 274877902848, 2199023247360, 17592186028032, 140737488322560, 1125899906777088, 9007199254609920, 72057594037665792
Offset: 0

Views

Author

Gary W. Adamson, Jun 25 2006

Keywords

Comments

a(n) is a leg in a Pythagorean triangle along with A081342(n) (the hypotenuse) and 4^n. Example: a(4) = 2040, A081342(4) = 2056; then sqrt(2056^2 - 2040^2) = 256 = 4^4. Characteristic polynomial of M = x^2 -10*x + 16.
Order of modular group of degree 2^(n-1)+1. - Artur Jasinski, Aug 04 2007

Crossrefs

Programs

  • Magma
    [2^(n-1)*(4^n-1): n in [0..30]]; // G. C. Greubel, Dec 27 2022
    
  • Maple
    a[0]:=0: a[1]:=3; for n from 2 to 20 do a[n]:=10*a[n-1]-16*a[n-2] end do: seq(a[n], n = 0 .. 20); # Emeric Deutsch, Aug 16 2007
    seq(binomial(2^n,2)*(2^n + 1),n=0..19); # Zerinvary Lajos, Jan 07 2008
  • Mathematica
    Table[2^(n-1) (4^n-1), {n,0,20}] (* Artur Jasinski, Aug 04 2007 *)
  • SageMath
    A120689=BinaryRecurrenceSequence(10,-16,0,3)
    [A120689(n) for n in range(31)] # G. C. Greubel, Dec 27 2022

Formula

a(n) = 8^n - A081342(n).
Given M = 2 X 2 matrix [5,3; 3,5]; M^n * [1,0] = [A081342(a), a(n)]. E.g. a(4) = 2040, right term in = M^4 * [1,0] = [2056, 2040] = [A081342(4), a(4)].
a(n) = 2^(n-1)*(4^n - 1). - Artur Jasinski, Aug 04 2007
From R. J. Mathar, Feb 16 2011: (Start)
a(n) = 3*A016131(n-1).
G.f.: 3*x / ( (1-2*x)*(1-8*x) ). (End)
E.g.f.: (1/2)*(exp(8*x) - exp(2*x)). - G. C. Greubel, Dec 27 2022

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 13 2007
More terms from Emeric Deutsch, Aug 16 2007

A140944 Triangle T(n,k) read by rows, the k-th term of the n-th differences of the Jacobsthal sequence A001045.

Original entry on oeis.org

0, 1, 0, -1, 2, 0, 3, -2, 4, 0, -5, 6, -4, 8, 0, 11, -10, 12, -8, 16, 0, -21, 22, -20, 24, -16, 32, 0, 43, -42, 44, -40, 48, -32, 64, 0, -85, 86, -84, 88, -80, 96, -64, 128, 0, 171, -170, 172, -168, 176, -160, 192, -128, 256, 0, -341, 342, -340, 344, -336, 352, -320, 384, -256, 512, 0
Offset: 0

Views

Author

Paul Curtz, Jul 24 2008

Keywords

Comments

A variant of the triangle A140503, now including the diagonal.
Since the diagonal contains zeros, rows sums are those of A140503.

Examples

			Triangle begins as:
    0;
    1,   0;
   -1,   2,   0;
    3,  -2,   4,  0;
   -5,   6,  -4,  8,   0;
   11, -10,  12, -8,  16,  0;
  -21,  22, -20, 24, -16, 32,  0;
		

Crossrefs

Programs

  • Magma
    [2^k*(1-(-2)^(n-k))/3: k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 18 2023
    
  • Maple
    A001045:= n -> (2^n-(-1)^n)/3;
    A140944:= proc(n,k) if n = 0 then A001045(k); else procname(n-1,k+1)-procname(n-1,k) ; fi; end:
    seq(seq(A140944(n,k),k=0..n),n=0..10); # R. J. Mathar, Sep 07 2009
  • Mathematica
    T[0, 0]=0; T[1, 0]= T[0, 1]= 1; T[0, k_]:= T[0, k]= T[0, k-1] + 2*T[0, k-2]; T[n_, n_]=0; T[n_, k_]:= T[n, k] = T[n-1, k+1] - T[n-1, k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2014 *)
    Table[2^k*(1-(-2)^(n-k))/3, {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2023 *)
  • PARI
    T(n, k) = (2^k - 2^n*(-1)^(n+k))/3 \\ Jianing Song, Aug 11 2022
    
  • SageMath
    def A140944(n,k): return 2^k*(1 - (-2)^(n-k))/3
    flatten([[A140944(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Feb 18 2023

Formula

T(n, k) = T(n-1, k+1) - T(n-1, k). T(0, k) = A001045(k).
T(n, k) = (2^k - 2^n*(-1)^(n+k))/3, for n >= k >= 0. - Jianing Song, Aug 11 2022
From G. C. Greubel, Feb 18 2023: (Start)
T(n, n-1) = A000079(n).
T(2*n, n) = (-1)^(n+1)*A192382(n+1).
T(2*n, n-1) = (-1)^n*A246036(n-1).
T(2*n, n+1) = A083086(n).
T(3*n, n) = -A115489(n).
Sum_{k=0..n} T(n, k) = A052992(n)*[n>0] + 0*[n=0].
Sum_{k=0..n} (-1)^k*T(n, k) = A045883(n).
Sum_{k=0..n} 2^k*T(n, k) = A084175(n).
Sum_{k=0..n} (-2)^k*T(n, k) = (-1)^(n+1)*A109765(n).
Sum_{k=0..n} 3^k*T(n, k) = A091056(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^(n+1)*A097038(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^(n+1)*A138495(n). (End)

Extensions

Edited and extended by R. J. Mathar, Sep 07 2009

A016203 Expansion of g.f. 1/((1-x)*(1-2*x)*(1-8*x)).

Original entry on oeis.org

1, 11, 95, 775, 6231, 49911, 399415, 3195575, 25565111, 204521911, 1636177335, 13089422775, 104715390391, 837723139511, 6701785148855, 53614281256375, 428914250182071, 3431314001718711, 27450512014273975, 219604096115240375, 1756832768924020151, 14054662151396355511
Offset: 0

Views

Author

Keywords

Comments

4*a(n) is the total number of holes in a certain box fractal (start with 8 boxes, 0 hole) after n iterations. See illustration in link. - Kival Ngaokrajang, Jan 27 2015

Crossrefs

Programs

Formula

a(n) = (4*8^(n+1) - 7*2^(n+1) + 3)/21. - Mitch Harris, Jun 27 2005; corrected by Yahia Kahloune, May 06 2013
a(0) = 1, a(n) = 8*a(n-1) + 2^(n+1) - 1. - Vincenzo Librandi, Feb 09 2011
From Elmo R. Oliveira, Mar 26 2025: (Start)
E.g.f.: exp(x)*(32*exp(7*x) - 14*exp(x) + 3)/21.
a(n) = 11*a(n-1) - 26*a(n-2) + 16*a(n-3).
a(n) = A016131(n+1) - A023001(n+2). (End)

Extensions

More terms from Elmo R. Oliveira, Mar 26 2025

A092123 Largest coefficient in expansion of P(0)=x, P(n+1)=P(n)*[1+P(n)].

Original entry on oeis.org

1, 1, 2, 10, 302, 391232, 912140731560, 6870302396056798235043564, 552249828443015013351729477795257932661645918815144
Offset: 0

Views

Author

Ralf Stephan, Apr 02 2004

Keywords

Comments

It would be nice to have a formula for the 2^(n-1)th coefficient.
The exponent of x in P(n) with a(n) as coefficient is {1,1,2,5,9,19,37,74,147,294,587,1175,...}.

Crossrefs

Cf. A016131.

Programs

  • PARI
    P(n)=if(n<1,x,P(n-1)*(P(n-1)+1))
    
  • PARI
    a(n)=vecmax(Vec(P(n)))
Showing 1-10 of 16 results. Next