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.

Previous Showing 51-60 of 61 results. Next

A215099 a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 11, 13, 18, 24, 25, 29, 34, 38, 39, 41, 44, 48, 53, 55, 56, 58, 71, 73, 78, 84, 85, 89, 94, 102, 103, 109, 120, 124, 131, 133, 138, 144, 145, 149, 162, 164, 169, 173, 178, 180, 181, 187, 192, 196, 197, 201
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

For n>0 and (n mod 4)<2, a(n) is odd.
Same definition, but k+a(n-2) is a
Fibonacci number: A006498 except first two terms,
Lucas number: A000045 except first two terms,
Pell number: A089928(n-1),
Jacobsthal number: A215095,
factorial: A215096,
square: A194274,
cube: A215097,
triangular number: A011848(n+2),
oblong number: A215098.
Example of a related sequence definition: a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a cube.

Crossrefs

Cf. A062042: a(1) = 2, a(n) = least k>a(n-1) such that k+a(n-1) is a prime.

Programs

  • PARI
    first(n) = my(res = vector(n, i, i-1), k); for(x=3, n, k=res[x-1]+1; while(!isprime(k+res[x-2]), k++); res[x]=k); res \\ Iain Fox, Apr 22 2019 (corrected by Iain Fox, Apr 25 2019)
  • Python
    from sympy import prime
    prpr = 0
    prev = 1
    for n in range(77):
        print(prpr, end=', ')
        b = c = 0
        while c<=prev:
            c = prime(b+1) - prpr
            b+=1
        prpr = prev
        prev = c
    

A345067 Consider the "Quilt Tiling"; T(n, k) is the area of the tile containing the unit square whose upper right corner has coordinates (n, k); square array T(n, k) read by antidiagonals upwards, n, k > 0.

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 6, 4, 4, 6, 6, 6, 4, 6, 6, 6, 6, 1, 1, 6, 6, 15, 6, 2, 9, 2, 6, 15, 15, 15, 2, 9, 9, 2, 15, 15, 15, 15, 15, 9, 9, 9, 15, 15, 15, 15, 15, 15, 2, 9, 9, 2, 15, 15, 15, 15, 15, 15, 2, 4, 9, 4, 2, 15, 15, 15, 40, 15, 15, 6, 4, 4, 4, 4, 6, 15, 15, 40
Offset: 1

Views

Author

Rémy Sigrist, Jun 06 2021

Keywords

Comments

The "Quilt Tiling" is described in Shectman's paper (see Links section).
All terms belong to A006498.

Examples

			Array T(n, k) begins:
  n\k|  1   2   3   4   5   6   7   8   9  10  11
  ---+---+-------+-----------+-------------------+
   1 |  1|  2   2|  6   6   6| 15  15  15  15  15|
     +-----------+           |                   |
   2 |  2|  4   4|  6   6   6| 15  15  15  15  15|
     |   |       +---+-------+                   |
   3 |  2|  4   4|  1|  2   2| 15  15  15  15  15|
     +---+---+---+---+-------+-------+-----------+
   4 |  6   6|  1|  9   9   9|  2   2|  6   6   6|
     |       +---+           +-------+           |
   5 |  6   6|  2|  9   9   9|  4   4|  6   6   6|
     |       |   |           |       +---+-------+
   6 |  6   6|  2|  9   9   9|  4   4|  1|  2   2|
     +-------+---+---+-------+-------+---+-------+
   7 | 15  15  15|  2|  4   4| 25  25  25  25  25|
     |           |   |       |                   |
   8 | 15  15  15|  2|  4   4| 25  25  25  25  25|
     |           +---+---+---+                   |
   9 | 15  15  15|  6   6|  1| 25  25  25  25  25|
     |           |       +---+                   |
  10 | 15  15  15|  6   6|  2| 25  25  25  25  25|
     |           |       |   |                   |
  11 | 15  15  15|  6   6|  2| 25  25  25  25  25|
     +-----------+-------+---+-------------------+
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

T(n, k) = T(k, n).
T(n, n) = A130312(n+1)^2.
T(n, 1) = A001654(A095791(n)+1).
T(n, k) is the square of a Fibonacci number for n = 1+A005206(k+1)..A000201(k).

A349840 The number of compositions of n using elements from the set {1,3,5,7,8}.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 13, 22, 35, 56, 91, 147, 238, 385, 623, 1009, 1632, 2640, 4272, 6912, 11184, 18096, 29280, 47377, 76657, 124033, 200690, 324723, 525413, 850136, 1375549, 2225686, 3601235, 5826920, 9428155
Offset: 0

Views

Author

Michael A. Allen, Dec 05 2021

Keywords

Comments

Number of ways to tile an n-board (an n X 1 array of 1 X 1 cells) using squares, trominoes, pentominoes, heptominoes, and octominoes.
Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-1,0,2,4,6,7} for all i=1,...,n.
a(n) gives the sums of the antidiagonals of A349839.

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), North-Holland, Amsterdam, 1970, pp. 755-770.

Crossrefs

Sums of antidiagonals of triangles in the same family as A349839: A000045, A006498, A079962, A349843.

Programs

  • Mathematica
    CoefficientList[Series[1/(1-x-x^3-x^5-x^7-x^8),{x,0,35}],x]

Formula

a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-7) + a(n-8) + delta(n,0), a(n<0)=0 (where delta(i,j) is the Kronecker delta).
a(n) = a(n-1) + a(n-2) + a(n-8) - a(n-9) - a(n-10) + delta(n,0) - delta(n,2), a(n<0)=0.
G.f.: 1/(1-x-x^3-x^5-x^7-x^8).

A349843 Expansion of (1 - x^2)/((1 - x^10)*(1 - x - x^2)).

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 56, 90, 145, 235, 380, 615, 995, 1610, 2605, 4215, 6821, 11036, 17856, 28892, 46748, 75640, 122388, 198028, 320416, 518444, 838861, 1357305, 2196165, 3553470, 5749635, 9303105
Offset: 0

Views

Author

Michael A. Allen, Dec 13 2021

Keywords

Comments

The number of compositions of n using elements from the set {1,3,5,7,9,10}.
Number of ways to tile an n-board (an n X 1 array of 1 X 1 cells) using squares, trominoes, pentominoes, heptominoes, nonominoes, and decominoes.
Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-1,0,2,4,6,8,9} for all i=1,...,n.
a(n) gives the sums of the antidiagonals of A349841.

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), North-Holland, Amsterdam, 1970, pp. 755-770.

Crossrefs

Sums of antidiagonals of triangles in the same family as A349841: A000045, A006498, A079962, A349840.

Programs

  • Mathematica
    CoefficientList[Series[1/(1-x-x^3-x^5-x^7-x^9-x^10), {x, 0, 35}], x]

Formula

a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-7) + a(n-9) + a(n-10) + delta(n,0), a(n<0)=0.
a(n) = a(n-1) + a(n-2) + a(n-10) - a(n-11) - a(n-12) + delta(n,0) - delta(n,2), a(n<0)=0.
G.f.: 1/(1-x-x^3-x^5-x^7-x^9-x^10).

A387020 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,0,5} for all i=1,...,n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 16, 20, 25, 34, 46, 67, 94, 130, 175, 231, 305, 400, 540, 729, 999, 1363, 1855, 2510, 3370, 4531, 6070, 8180, 11026, 14921, 20197, 27322, 36940, 49820, 67204, 90528, 122091, 164686, 222344, 300316, 405574, 547768, 739291, 997794, 1346130
Offset: 0

Views

Author

Michael A. Allen, Aug 13 2025

Keywords

Examples

			a(7) = 2: 1234567, 6712345.
a(8) = 3: 12345678, 17823456, 67123458.
		

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), North-Holland, Amsterdam, 1970, pp. 755-770.

Crossrefs

Sequences for numbers of permutations such that p(i)-i is in {-2,0,d} for d=1,..,8: A000930, A006498, A080000, A224809, A387020, A224808, A387021, A224811.

Programs

  • Mathematica
    CoefficientList[Series[(1 - 2*x^7 - x^9 + x^14)/(1 - x - 3*x^7 + 2*x^8 - 2*x^9 + x^10 - x^11 + 3*x^14 - x^15 + 2*x^16 - x^21),{x,0,51}],x]
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 3, -2, 2, -1, 1, 0, 0, -3, 1, -2, 0, 0, 0, 0, 1}, {1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 16, 20, 25, 34, 46, 67, 94, 130}, 52]

Formula

a(n) = a(n-1) + 3*a(n-7) - 2*a(n-8) + 2*a(n-9) - a(n-10) + a(n-11) - 3*a(n-14) + a(n-15) - 2*a(n-16) + a(n-21) for n >= 21.
G.f.: (1 - 2*x^7 - x^9 + x^14)/((1 - x)*(1 - x + x^2 - 2*x^3 + x^4 - x^5 - x^7 + x^10)*(1 + x + x^3 + 2*x^4 + x^5 + 2*x^6 + 2*x^7 + x^8 + x^9 + x^10)).

A387021 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,0,7} for all i=1,...,n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 17, 21, 25, 30, 36, 46, 59, 81, 109, 153, 207, 277, 361, 463, 589, 743, 949, 1211, 1589, 2083, 2773, 3670, 4861, 6388, 8344, 10848, 14019, 18166, 23479, 30556, 39762, 52049, 68125, 89345, 117034, 153078, 199979, 260572, 339546, 441669, 575341
Offset: 0

Views

Author

Michael A. Allen, Aug 13 2025

Keywords

Examples

			a(9)=2: 123456789, 891234567.
		

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), North-Holland, Amsterdam, 1970, pp. 755-770.

Crossrefs

Sequences for numbers of permutations such that p(i)-i is in {-2,0,d} for d=1,...,8: A000930, A006498, A080000, A224809, A387020, A224808, A387021, A224811.

Programs

  • Mathematica
    CoefficientList[Series[(1 - 3*x^9 - 2*x^11 - x^13 + 3*x^18 + 2*x^20 - x^27)/ (1 - x - 4*x^9 + 3*x^10 - 3*x^11 + 2*x^12 - 2*x^13 + x^14 - x^15 + 6*x^18 - 3*x^19 + 6*x^20 - 2*x^21 + 3*x^22 - 4*x^27 + x^28 - 3*x^29 + x^36),{x,0,55}],x]
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 4, -3, 3, -2, 2, -1, 1, 0, 0, -6, 3, -6, 2, -3, 0, 0, 0, 0, 4, -1, 3, 0, 0, 0, 0, 0, 0, -1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 17, 21, 25, 30, 36, 46, 59, 81, 109, 153, 207, 277, 361, 463, 589, 743, 949, 1211, 1589, 2083, 2773}, 56]

Formula

a(n) = a(n-1) + 4*a(n-9) - 3*a(n-10) + 3*a(n-11) - 2*a(n-12) + 2*a(n-13) - a(n-14) + a(n-15) - 6*a(n-18) + 3*a(n-19) - 6*a(n-20) + 2*a(n-21) - 3*a(n-22) + 4*a(n-27) - a(n-28) + 3*a(n-29) - a(n-36) for n >= 36.
G.f.: (1 - 3*x^9 - 2*x^11 - x^13 + 3*x^18 + 2*x^20 - x^27)/ (1 - x - 4*x^9 + 3*x^10 - 3*x^11 + 2*x^12 - 2*x^13 + x^14 - x^15 + 6*x^18 - 3*x^19 + 6*x^20 - 2*x^21 + 3*x^22 - 4*x^27 + x^28 - 3*x^29 + x^36).

A089931 a(n) = 3*a(n-1) + 3*a(n-3) + a(n-4).

Original entry on oeis.org

1, 3, 9, 30, 100, 330, 1089, 3597, 11881, 39240, 129600, 428040, 1413721, 4669203, 15421329, 50933190, 168220900, 555595890, 1835008569, 6060621597, 20016873361, 66111241680, 218350598400, 721163036880, 2381839709041
Offset: 0

Views

Author

Paul Barry, Nov 15 2003

Keywords

Crossrefs

Cf. A006498.

Programs

  • Mathematica
    LinearRecurrence[{3,0,3,1},{1,3,9,30},30] (* Harvey P. Dale, Jun 16 2015 *)

Formula

a(n) = ((3 + sqrt(13)^n(11 + 3*sqrt(13))/13 + (3 - sqrt(13)^n(11 - 3*sqrt(13))/13)*2^(-1 - n) + 2(-1)^n/13;
a(n) = (-i)^n*Sum_{k=0..floor(n/2)} U(n-2k, 3i/2) where i = sqrt(-1).
G.f.: -1 / ( (1+x^2)*(x^2+3*x-1) ). - R. J. Mathar, Feb 14 2015

A106408 Triangle, read by rows, where T(1,1) = 1; T(2,1) = T(2,2) = 2; for n > 2, T(n,n) = T(n-1,n-1) + T(n-2,n-2); T(n+1,n) = 2 * T(n,n); for all other entries, T(n,k) = T(n-1,k) + T(n-2,k).

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 5, 6, 6, 5, 8, 10, 9, 10, 8, 13, 16, 15, 15, 16, 13, 21, 26, 24, 25, 24, 26, 21, 34, 42, 39, 40, 40, 39, 42, 34, 55, 68, 63, 65, 64, 65, 63, 68, 55, 89, 110, 102, 105, 104, 104, 105, 102, 110, 89, 144, 178, 165, 170, 168, 169, 168, 170, 165, 178, 144
Offset: 1

Views

Author

Gerald McGarvey, May 28 2005

Keywords

Comments

Row sums are A004798 (convolution of Fibonacci numbers 1,2,3,5,... with themselves). Central numbers of the rows are A006498 (a(n) = a(n-1)+a(n-3)+a(n-4)). First column and main diagonal are Fibonacci numbers 1,2,3,5,... First subdiagonal are 2*Fibonacci numbers. T(n,k) = F(n-k+2)*F(k+1) where F(m) is the m-th Fibonacci number. For the antidiagonal sums b(n): b(1) = 1, b(2) = 2, then b(n) = b(n-1) + b(n-2) + F(floor((n+3)/2)).
T(n,k) is the number of Boolean intervals of the form [s_k,w] in the weak order on S_n, for a fixed simple reflection s_k. - Bridget Tenner, Jan 16 2020

Examples

			Triangle begins
   1;
   2,  2;
   3,  4,  3;
   5,  6,  6,  5;
   8, 10,  9, 10,  8;
		

Crossrefs

Formula

G.f.: (1+x+y+x*y)/((1-x-x^2)*(1-y-y^2)) [U coordinates] - N. J. A. Sloane, Jun 01 2005

A189101 Expansion of g.f. 1/(1-(x+x^2+x^3+x^4+x^6+x^7)).

Original entry on oeis.org

1, 1, 2, 4, 8, 15, 30, 59, 115, 225, 441, 863, 1689, 3307, 6474, 12673, 24809, 48567, 95075, 186120, 364352, 713261, 1396290, 2733399, 5350944, 10475089, 20506194, 40143239, 78585017, 153839228, 301158021, 589551538, 1154115087, 2259313307, 4422866209
Offset: 0

Views

Author

N. J. A. Sloane, Apr 19 2011

Keywords

Comments

Compositions of n into parts !=5 and <=7. - Joerg Arndt, Jun 06 2011

Crossrefs

This sequence is the next in the series after A000931, A006498, A079976, A079968.

Programs

  • Maxima
    makelist(coeff(taylor(1/(1-(x+x^2+x^3+x^4+x^6+x^7)), x, 0, n), x, n), n, 0, 34);  /* Bruno Berselli, Jun 05 2011 */
    
  • PARI
    Vec(1/(1-(x+x^2+x^3+x^4+x^6+x^7))+O(x^99)) \\ Charles R Greathouse IV, Feb 26 2014

A215095 a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a Jacobsthal number.

Original entry on oeis.org

0, 1, 3, 4, 8, 17, 35, 68, 136, 273, 547, 1092, 2184, 4369, 8739, 17476, 34952, 69905, 139811, 279620, 559240, 1118481, 2236963, 4473924, 8947848, 17895697, 35791395, 71582788, 143165576, 286331153, 572662307, 1145324612, 2290649224, 4581298449, 9162596899
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

Same definition, but k+a(n-2) is a
Fibonacci number: A006498 except first two terms,
Lucas number: A000045 except first two terms,
Pell number: A089928(n-1),
factorial: A215096,
square: A194274,
cube: A215097,
triangular number: A011848(n+2),
oblong number: A215098,
prime number: A215099.
Example of a related sequence definition: a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a cube.

Crossrefs

Programs

  • Python
    prpr = 0
    prev = 1
    jac = [0]*10000
    for n in range(10000):
        jac[n] = prpr
        curr = prpr*2 + prev
        prpr = prev
        prev = curr
    prpr, prev = 0, 1
    for n in range(1, 44):
        print(prpr, end=', ')
        b = c = 0
        while c<=prev:
            c = jac[b] - prpr
            b+=1
        prpr = prev
        prev = c

Formula

Conjecture: G.f. (x+2*x^2)/(1-x-x^2-x^3-2*x^4). - David Scambler, Aug 06 2012
Previous Showing 51-60 of 61 results. Next