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 10 results.

A224809 Number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i not in the set I, i=1..n, with k=2, r=4, I={-1,1,2,3}.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 4, 6, 9, 12, 16, 24, 36, 54, 81, 117, 169, 247, 361, 532, 784, 1148, 1681, 2460, 3600, 5280, 7744, 11352, 16641, 24381, 35721, 52353, 76729, 112462, 164836, 241570, 354025, 518840, 760384, 1114416, 1633284
Offset: 0

Views

Author

Vladimir Baltic, May 16 2013

Keywords

Comments

Number of subsets of {1,2,...,n-4} without differences equal to 2 or 4.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(x-1)*(1+x+x^2)/((x^3+x-1)*(x^6-x^4-1)), {x, 0, 50}], x] (* G. C. Greubel, Apr 28 2017 *)
  • PARI
    N = 42; x = 'x + O('x^N);
    Vec(Ser(-(x-1)*(1+x+x^2)/((x^3+x-1)*(x^6-x^4-1))))  \\ Gheorghe Coserea, Nov 11 2016

Formula

a(n) = a(n-1) + a(n-3) - a(n-4) + a(n-5) + a(n-6) - a(n-9).
G.f.: -(x-1)*(1+x+x^2) / ( (x^3+x-1)*(x^6-x^4-1) ).
a(2*k) = (A000930(k))^2, a(2*k+1) = A000930(k) * A000930(k+1).

A354666 Triangle read by rows, T(n,k) = T(n-1,k) + T(n-2,k-1) + 2*T(n-2,k-2) - T(n-3,k-1) - T(n-3,k-2) + T(n-4,k-1) + T(n-4,k-2) - T(n-4,k-3) - T(n-4,k-4) + delta(n,0)*delta(k,0) - delta(n,2)*(delta(k,1) + delta(k,2)), T(n

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 0, 2, 0, 1, 1, 4, 0, 1, 1, 2, 6, 0, 3, 0, 1, 3, 9, 4, 9, 0, 1, 1, 4, 12, 10, 18, 0, 4, 0, 1, 5, 16, 21, 36, 10, 16, 0, 1, 1, 6, 21, 36, 60, 30, 40, 0, 5, 0, 1, 7, 27, 57, 100, 81, 100, 20, 25, 0, 1, 1, 8, 34, 84, 158, 168
Offset: 0

Views

Author

Michael A. Allen, Jun 04 2022

Keywords

Comments

This is the m=2, t=4 member of a two-parameter family of triangles such that T(n,k) is the number of tilings of an (n+(t-1)*k) X 1 board using k (1,m-1;t)-combs and n-k unit square tiles. A (1,g;t)-comb is composed of a line of t unit square tiles separated from each other by gaps of width g.
T(2*j+r-3*k,k) is the coefficient of x^k in (f(j,x))^(2-r)*(f(j+1,x))^r for r=0,1, where f(n,x) is a (1,4)-bonacci polynomial defined by f(n,x)=f(n-1,x)+x*f(n-4,x)+delta(n,0) where f(n<0,x)=0.
T(n+6-3*k,k) is the number of subsets of {1,2,...,n} of size k such that no two elements in a subset differ by 2, 4, or 6.

Examples

			Triangle begins:
  1;
  1,   0;
  1,   0,   1;
  1,   0,   2,   0;
  1,   1,   4,   0,   1;
  1,   2,   6,   0,   3,   0;
  1,   3,   9,   4,   9,   0,   1;
  1,   4,  12,  10,  18,   0,   4,   0;
  1,   5,  16,  21,  36,  10,  16,   0,   1;
  1,   6,  21,  36,  60,  30,  40,   0,   5,   0;
  1,   7,  27,  57, 100,  81, 100,  20,  25,   0,   1;
  1,   8,  34,  84, 158, 168, 200,  70,  75,   0,   6,   0;
  1,   9,  42, 118, 243, 322, 400, 231, 225,  35,  36,   0,   1;
...
		

Crossrefs

Row sums are A099163.
Sums over k of T(n-3*k,k) are A224808.
Other members of the family of triangles: A007318 (m=1,t=2), A059259 (m=2,t=2), A350110 (m=3,t=2), A350111 (m=4,t=2), A350112 (m=5,t=2), A354665 (m=2,t=3), A354667 (m=2,t=5), A354668 (m=3,t=3).
Other triangles related to tiling using combs: A059259, A123521, A157897, A335964.

Programs

  • Mathematica
    T[n_,k_]:=If[k<0 || n
    				

Formula

T(n,0) = 1.
T(n,n) = delta(n mod 2,0).
T(n,1) = n-3 for n>2.
T(2*j-r,2*j-1) = 0 for j>0, r=-1,0,1.
T(2*(j-1)+p,2*(j-1)) = j^p for j>0 and p=0,1,2.
T(2*j+p,2*(j-1)) = j^2*((j+1)/2)^p for j>0 and p=1,2.
T(2*j+3,2*(j-1)) = (j*(j+1))^2*(j+2)/12 for j>0.
T(2*(j+p),2*j-p) = C(j+2,3)^p for j>0 and p=0,1,2.
G.f. of row sums: (1-2*x^2)/(1-x-3*x^2+2*x^3).
G.f. of sums of T(n-3*k,k) over k: (1-x^5-x^8)/(1-x-x^5+x^6-x^7-2*x^8+x^9-x^10+x^13+x^16).
T(n,k) = T(n-1,k) + T(n-1,k-1) for n>=3*k+1 if k>=0.

A224811 Number of subsets of {1,2,...,n-8} without differences equal to 2, 4, 6 or 8.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 48, 64, 88, 121, 165, 225, 300, 400, 520, 676, 884, 1156, 1530, 2025, 2700, 3600, 4800, 6400, 8480, 11236, 14840, 19600, 25900, 34225, 45325, 60025, 79625, 105625, 140075, 185761, 246101, 326041, 431676, 571536, 756756, 1002001, 1327326, 1758276, 2329782, 3087049, 4090296, 5419584
Offset: 0

Views

Author

Vladimir Baltic, May 18 2013

Keywords

Comments

Number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=2, r=8, I={-2,0,8}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^10 - x^5 - x^7 + x^15)/((1 - x)*(1 + x)*(x^2 - x + 1)*(x^3 + x^2 - 1)*(x^6 - x^2 - 1)*(x^12 + x^10 + x^8 + 2*x^6 + x^4 + 1)), {x, 0, 50}], x] (* G. C. Greubel, Oct 28 2017 *)
  • PARI
    x='x+O('x^50); Vec((1-x^10-x^5-x^7+x^15)/((1-x)*(1+x)*(x^2-x+1)*( x^3+x^2-1)*(x^6-x^2-1)*(x^12+x^10+x^8+2*x^6+x^4+1) )) \\ G. C. Greubel, Oct 28 2017

Formula

a(n) = a(n-1) +a(n-5) -a(n-6) +a(n-7) -a(n-8) +a(n-9) +2*a(n-10) -a(n-11) +a(n-12) -2*a(n-15) +a(n-16) -2*a(n-17) -a(n-20) +a(n-25).
G.f.: (1-x^10-x^5-x^7+x^15) / ( (1-x) *(1+x) *(x^2-x+1) *(x^3+x^2-1) *(x^6-x^2-1) *(x^12+x^10+x^8+2*x^6+x^4+1) ).
a(2*k) = (A003520(k))^2,
a(2*k+1) = A003520(k) * A003520(k+1)

A224815 Number of subsets of {1,2,...,n-8} without differences equal to 4 or 8.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 24, 36, 54, 81, 108, 144, 192, 256, 384, 576, 864, 1296, 1944, 2916, 4374, 6561, 9477, 13689, 19773, 28561, 41743, 61009, 89167, 130321, 192052, 283024, 417088, 614656, 900032, 1317904, 1929788, 2825761
Offset: 0

Views

Author

Vladimir Baltic, May 18 2013

Keywords

Comments

a(n) is the number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=4, r=8, I={-4,0,8}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^3 + x^4 - x^5 - x^6 - 3*x^7 + 3*x^8 - 2*x^9 - x^10 - 5*x^11 - 3*x^12 - 2*x^13 + 3*x^15 - 3*x^16 - 3*x^18 + 3*x^19 - 3*x^20 + 3*x^21 + 3*x^23 + 6*x^24 - 3*x^25 - 2*x^26 - 4*x^27 - x^29 - x^30 - 2*x^31 - x^32 + x^33 + x^35 - x^36 + x^37 + x^39)/((1 - x - x^3)*(1 + x^4 + x^6)*(1 + x^4 - x^6)*(1 - x^4 - x^12)*(1 + x^4 + 6*x^8 - 3*x^12 + 2*x^20 + x^24)), {x, 0, 50}], x] (* G. C. Greubel, Apr 28 2017 *)

Formula

a(n) = a(n-1)+a(n-3)-2*a(n-4)+2*a(n-5)+2*a(n-7)-6*a(n-8)+6*a(n-9)+6*a(n-11) +a(n-12)-a(n-13)-a(n-15)+13*a(n-16)-13*a(n-17)-13*a(n-19)+15*a(n-20)-15*a(n-21)-15*a(n-23)-6*a(n-24)+6*a(n-25)+6*a(n-27)+3*a(n-28)-3*a(n-29)-3*a(n-31)-2*a(n-32)+2*a(n-33)+2*a(n-35)+8*a(n-36)-8*a(n-37)-8*a(n-39)+3*a(n-40)-3*a(n-41)-3*a(n-43)-a(n-44)+a(n-45)+a(n-47)-a(n-48)+a(n-49)+a(n-51).
G.f.: ( 1-x^3+x^4-x^5-x^6-3*x^7+3*x^8-2*x^9-x^10-5*x^11-3*x^12-2*x^13 +3*x^15-3*x^16-3*x^18+3*x^19-3*x^20+3*x^21+3*x^23+6*x^24-3*x^25-2*x^26-4*x^27-x^29-x^30-2*x^31-x^32+x^33+x^35-x^36+x^37+x^39 ) / ((1-x-x^3)*(1+x^4+x^6)*(1+x^4-x^6)*(1-x^4-x^12)*(1+x^4+6*x^8-3*x^12+2*x^20+x^24)).
a(4*k) = (A000930(k))^4,
a(4*k+1) = (A000930(k))^3 * A000930(k+1),
a(4*k+2) = (A000930(k))^2 * (A000930(k+1))^2,
a(4*k+3) = A000930(k) * (A000930(k+1))^3.

A224810 Subsets of {1,2,...,n-6} without differences equal to 3 or 6.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 12, 18, 27, 36, 48, 64, 96, 144, 216, 324, 486, 729, 1053, 1521, 2197, 3211, 4693, 6859, 10108, 14896, 21952, 32144, 47068, 68921, 100860, 147600, 216000, 316800, 464640, 681472, 998976
Offset: 0

Views

Author

Vladimir Baltic, May 16 2013

Keywords

Comments

Number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i not in the set I, i=1..n, with k=3, r=6, I={-2,-1,1,2,3,4,5}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + x^3 - x^4 - x^5 + x^6 - 2*x^7 - x^8 - x^9 - 2*x^10 - x^12 - x^13 - x^15)/((1 - x)*(1 + x + x^2)*(1 - x - x^3)*(1 + 3*x^3 + 7*x^6 + 9*x^9 + 7*x^12 + 3*x^15 + x^18)), {x, 0, 50}], x] (* G. C. Greubel, Apr 30 2017 *)
  • PARI
    x='x+O('x^50); Vec((1 + x^3 - x^4 - x^5 + x^6 - 2*x^7 - x^8 - x^9 - 2*x^10 - x^12 - x^13 - x^15)/((1 - x)*(1 + x + x^2)*(1 - x - x^3)*(1 + 3*x^3 + 7*x^6 + 9*x^9 + 7*x^12 + 3*x^15 + x^18))) \\ G. C. Greubel, Apr 30 2017

Formula

a(3*k) = (A000930(k))^3.
a(3*k+1) = (A000930(k))^2 * A000930(k+1).
a(3*k+2) = A000930(k) * (A000930(k+1))^2.
a(n) = a(n-1) -a(n-3) +2*a(n-4) -2*a(n-6) +4*a(n-7) +2*a(n-9) +2*a(n-10) +4*a(n-12) -2*a(n-13) +2*a(n-15) -4*a(n-16) -2*a(n-18) -2*a(n-19) -a(n-21) -a(n-22) -a(n-24)
G.f.: (1+x^3-x^4-x^5+x^6-2*x^7-x^8-x^9-2*x^10-x^12-x^13-x^15) / ((1-x)*(1+x+x^2)*(1-x-x^3)*(1+3*x^3+7*x^6+9*x^9+7*x^12+3*x^15+x^18))

A224814 Number of subsets of {1,2,...,n-9} without differences equal to 3, 6 or 9.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 12, 18, 27, 36, 48, 64, 80, 100, 125, 175, 245, 343, 490, 700, 1000, 1400, 1960, 2744, 3724, 5054, 6859, 9386, 12844, 17576, 24336, 33696, 46656, 64800, 90000, 125000, 172500, 238050, 328509, 452295, 622725, 857375, 1182275, 1630295, 2248091, 3106141, 4291691, 5929741, 8190250, 11312500, 15625000, 21562500
Offset: 0

Views

Author

Vladimir Baltic, May 18 2013

Keywords

Comments

a(n) is the number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=3, r=9, I={-3,0,9}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^4 - x^5 - x^7 - x^8 + 2*x^9 - x^10 - 3*x^12 - x^13 - 2*x^15 + 3*x^16 + 3*x^17 + 2*x^18 - x^20 - 4*x^21 + x^23 + 3*x^24 + 3*x^25 + x^27 - 4*x^28 - x^29 - 2*x^30 + x^31 + 2*x^33 +x^34 - x^36 - x^37 + x^40)/((1 - x - x^4)*(1 - x^9 - x^12)*(1 + x^6 + 4*x^9 - 4*x^12 - 2*x^15 + 4*x^18 - 3*x^21 - 3*x^24 + 7*x^27 - 6*x^30 + 3*x^33 - x^36)), {x, 0, 50}], x] (* G. C. Greubel, Oct 28 2017 *)
  • PARI
    x='x+O('x^50); Vec((1 -x^4 -x^5 -x^7 -x^8 +2*x^9 -x^10 -3*x^12 -x^13 -2*x^15 +3*x^16 +3*x^17 +2*x^18 -x^20 -4*x^21 +x^23 +3*x^24 +3*x^25 +x^27 -4*x^28 -x^29 -2*x^30 +x^31 +2*x^33 +x^34 -x^36 -x^37 +x^40 )/((1-x-x^4)*(1-x^9-x^12)*(1 +x^6 +4*x^9 -4*x^12 -2*x^15 +4*x^18 -3*x^21 -3*x^24 +7*x^27 -6*x^30 +3*x^33 -x^36))) \\ G. C. Greubel, Oct 28 2017

Formula

a(n) = a(n-1) +a(n-4) -a(n-6) +a(n-7) -3*a(n-9) +4*a(n-10) +5*a(n-12) -2*a(n-13) +3*a(n-15) -8*a(n-16) +a(n-18) -4*a(n-19) +3*a(n-21) -4*a(n-22) -3*a(n-24) -5*a(n-27) +8*a(n-28) +7*a(n-30) -2*a(n-31) -9*a(n-33) +2*a(n-34) +5*a(n-36) +4*a(n-37) +a(n-39) -6*a(n-40) -3*a(n-42) +2*a(n-43) +2*a(n-45) +a(n-46) -a(n-48) -a(n-49) +a(n-52).
G.f.: (1 -x^4 -x^5 -x^7 -x^8 +2*x^9 -x^10 -3*x^12 -x^13 -2*x^15 +3*x^16 +3*x^17 +2*x^18 -x^20 -4*x^21 +x^23 +3*x^24 +3*x^25 +x^27 -4*x^28 -x^29 -2*x^30 +x^31 +2*x^33 +x^34 -x^36 -x^37 +x^40 )/((1-x-x^4)*(1-x^9-x^12)*(1 +x^6 +4*x^9 -4*x^12 -2*x^15 +4*x^18 -3*x^21 -3*x^24 +7*x^27 -6*x^30 +3*x^33 -x^36)).
a(3*k) = (A003269(k))^3,
a(3*k+1) = (A003269(k))^2 * A003269(k+1),
a(3*k+2) = A003269(k) * (A003269(k+1))^2.

A224812 Number of subsets of {1,2,...,n-10} without differences equal to 2, 4, 6, 8 or 10.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 63, 81, 108, 144, 192, 256, 336, 441, 567, 729, 918, 1156, 1462, 1849, 2365, 3025, 3905, 5041, 6532, 8464, 10948, 14161, 18207, 23409, 29988, 38416, 49196, 63001, 80822, 103684, 133308, 171396, 220662, 284089, 365638, 470596, 605052, 777924, 999306, 1283689, 1648515
Offset: 0

Views

Author

Vladimir Baltic, May 18 2013

Keywords

Comments

a(n) is the number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=2, r=10, I={-2,0,10}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(x + 1)*(x^23 - x^22 + x^21 - x^20 + x^19 - x^13 + x^12 - 3*x^11 + 3*x^10 - 3*x^9 + 2*x^8 - 2*x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)/((x^6 + x - 1)*(x^30 + x^24 - 2*x^20 - 2*x^18 - x^14 - 2*x^12 + x^10 + x^8 + x^6 + 1)), {x, 0, 50}], x] (* G. C. Greubel, Oct 28 2017 *)
  • PARI
    x='x+O('x^50); Vec(-(x + 1)*(x^23 - x^22 + x^21 - x^20 + x^19 - x^13 + x^12 - 3*x^11 + 3*x^10 - 3*x^9 + 2*x^8 - 2*x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)/((x^6 + x - 1)*(x^30 + x^24 - 2*x^20 - 2*x^18 - x^14 - 2*x^12 + x^10 + x^8 + x^6 + 1))) \\ G. C. Greubel, Oct 28 2017

Formula

a(n) = a(n-1) +a(n-7) -a(n-8) +a(n-9) -a(n-10) +a(n-11) +3*a(n-12) -2*a(n-13) +2*a(n-14) -a(n-15) +a(n-16) -2*a(n-19) +a(n-20) -2*a(n-21) -3*a(n-24) +a(n-25) -2*a(n-26) +a(n-31) +a(n-36).
G.f.: -(x+1) *(x^23 -x^22 +x^21 -x^20 +x^19 -x^13 +x^12 -3*x^11 +3*x^10 -3*x^9 +2*x^8 -2*x^7 +x^6 -x^5 +x^4 -x^3 +x^2 -x +1)/ ((x^6 +x -1) *(x^30 +x^24 -2*x^20 -2*x^18 -x^14 -2*x^12 +x^10 +x^8 +x^6+1) ).
a(2*k) = (A005708(k))^2, a(2*k+1) = A005708(k) * A005708(k+1).

A224813 Number of subsets of {1,2,...,n-12} without differences equal to 2, 4, 6, 8, 10 or 12.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 56, 64, 80, 100, 130, 169, 221, 289, 374, 484, 616, 784, 980, 1225, 1505, 1849, 2279, 2809, 3498, 4356, 5478, 6889, 8715, 11025, 13965, 17689, 22344, 28224, 35448, 44521, 55704, 69696, 87120, 108900, 136290, 170569, 213934, 268324, 337218, 423801, 533169, 670761, 843570
Offset: 0

Views

Author

Vladimir Baltic, May 18 2013

Keywords

Comments

a(n) is the number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=2, r=12, I={-2,0,12}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(-1 + x^7 + x^9 + x^11 + 2*x^14 + x^16 - 2*x^21 - 2*x^23 - x^28 + x^35)/((x^7 + x - 1)*(x^42 - x^36 - 2*x^30 - 3*x^28 + 2*x^24 + 2*x^22 + x^18 + 2*x^16 + 3*x^14 - x^12 - x^10 - x^8 - 1)), {x, 0, 1000}], x] (* G. C. Greubel, Oct 28 2017 *)
  • PARI
    x='x+O('x^50); Vec(-(-1 + x^7 + x^9 + x^11 + 2*x^14 + x^16 - 2*x^21 - 2*x^23 - x^28 + x^35)/((x^7 + x - 1)*(x^42 - x^36 - 2*x^30 - 3*x^28 + 2*x^24 + 2*x^22 + x^18 + 2*x^16 + 3*x^14 - x^12 - x^10 - x^8 - 1))) \\ G. C. Greubel, Oct 28 2017

Formula

a(n) = a(n-1) +a(n-7) -a(n-8) +a(n-9) -a(n-10) +a(n-11) -a(n-12) +a(n-13) +3*a(n-14) -2*a(n-15) +2*a(n-16) -a(n-17) +a(n-18) -3*a(n-21) +2*a(n-22) -4*a(n-23) +2*a(n-24) -3*a(n-25) -3*a(n-28) +a(n-29) -2*a(n-30) +3*a(n-35) -a(n-36) +3*a(n-37) +a(n-42) -a(n-49).
G.f.: -(-1 +x^7 +x^9 +x^11 +2*x^14 +x^16 -2*x^21 -2*x^23 -x^28 +x^35)/( (x^7+x-1) *(x^42 -x^36 -2*x^30 -3*x^28 +2*x^24 +2*x^22 +x^18 +2*x^16 +3*x^14 -x^12 -x^10 -x^8 -1) ).
a(2*k) = (A005709(k))^2, a(2*k+1) = A005709(k) * A005709(k+1).

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).
Showing 1-10 of 10 results.