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 11-20 of 77 results. Next

A224808 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=6, I={-1,1,2,3,4,5}.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 9, 12, 16, 20, 25, 35, 49, 70, 100, 140, 196, 266, 361, 494, 676, 936, 1296, 1800, 2500, 3450, 4761, 6555, 9025, 12445, 17161, 23711, 32761, 45250, 62500, 86250, 119025, 164220, 226576, 312732, 431649, 595899, 822649, 1135564, 1567504, 2163456, 2985984
Offset: 0

Views

Author

Vladimir Baltic, Apr 18 2013

Keywords

Comments

a(n) is the number of subsets of {1,2,...,n-6} without differences equal to 2, 4 or 6.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^5 - x^8)/(1 - x - x^5 + x^6 - x^7 - 2*x^8 + x^9 - x^10 + x^13 + x^16), {x, 0, 50}], x] (* G. C. Greubel, Oct 28 2017 *)
    LinearRecurrence[{1,0,0,0,1,-1,1,2,-1,1,0,0,-1,0,0,-1},{1,1,1,1,1,1,1,2,4,6,9,12,16,20,25,35},60] (* Harvey P. Dale, Dec 02 2024 *)
  • PARI
    x='x+O('x^66); Vec((1-x^5-x^8)/(1-x-x^5+x^6-x^7-2*x^8+x^9-x^10+x^13+x^16) ) \\ Joerg Arndt, Apr 19 2013

Formula

a(n) = a(n-1) + a(n-5) - a(n-6) + a(n-7) + 2*a(n-8) - a(n-9) + a(n-10) - a(n-13) + a(n-16).
G.f.: (1-x^5-x^8)/(1-x-x^5+x^6-x^7-2*x^8+x^9-x^10+x^13+x^16).
a(2*k-2) = (A003269(k))^2,
a(2*k-1) = A003269(k) * A003269(k+1)

A006500 Restricted combinations.

Original entry on oeis.org

1, 2, 4, 8, 12, 18, 27, 45, 75, 125, 200, 320, 512, 832, 1352, 2197, 3549, 5733, 9261, 14994, 24276, 39304, 63580, 102850, 166375, 269225, 435655, 704969, 1140624, 1845504, 2985984, 4831488, 7817616, 12649337, 20466953, 33116057, 53582633
Offset: 0

Views

Author

Keywords

Comments

a(n)=( A000045(k+2) )^3 if n=3k, a(n)=( A000045(k+2) )^3 * A000045(k+3) if n=3k+1, a(n)= A000045(k+2) * ( A000045(k+3) )^2 if n=3k+2. Number of all subsets of the set {1,2,...,n} which do not contain two elements whose difference is 3. a(n) is number of compositions of n+3 into elements of the set {1,2,4,5,6}, but with condition that 2 succeed only 2 or 4. Number of all permutations of {1,2,...,n+3} satisfying p(i)-i in {-3,0,3}. - Vladimir Baltic, Feb 17 2003

Examples

			For example, a_4=12 and 12 subsets are: emptyset, {1}, {2}, {3}, {4}, {1,2}, {1,3}, {2,3}, {2,4}, {3,4}, {1,2,3}, {2,3,4}. Corresponding compositions of 7=4+3 are: 1+1+1+1+1+1+1+1, 4+1+1+1, 1+4+1+1, 1+1+4+1, 1+1+1+4, 5+1+1, 4+2+1, 1+5+1, 1+4+2, 1+1+5, 6+1 and 1+6.
		

References

  • M. El-Mikkawy, T. Sogabe, A new family of k-Fibonacci numbers, Appl. Math. Comput. 215 (2010) 4456-4461 doi:10.1016/j.amc.2009.12.069, Table 1 k=3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    A006500:=-(2*z**6+z**7-z**4+z**5-3*z**3-z**2-z-1)/(z**6-z**3-1)/(z**2+z-1); # Conjectured by Simon Plouffe in his 1992 dissertation.
  • Mathematica
    Table[Fibonacci[Floor[n/3] + 3]^Mod[n, 3] * Fibonacci[Floor[n/3] + 2]^(3 - Mod[n, 3]), {n, 0, 40}]  (* David Nacin, Feb 29 2012 *)
    Table[Product[Fibonacci[Floor[(n + i)/3] + 2], {i, 0, 2}], {n, 0, 30}] (* David Nacin, Mar 07 2012 *)
    LinearRecurrence[{1, 1, -1, 1, 1, 1, -1, -1}, {1, 2, 4, 8, 12, 18, 27, 45}, 40] (* David Nacin, Mar 07 2012 *)
  • Python
    def a(n, adict={0:1, 1:2, 2:4, 3:8, 4:12, 5:18, 6:27, 7:45}):
        if n in adict:
            return adict[n]
        adict[n]=a(n-1)+a(n-2)-a(n-3)+a(n-4)+a(n-5)+a(n-6)-a(n-7)-a(n-8)
        return adict[n] # David Nacin, Mar 07 2012

Formula

Recurrence: a(n) = a(n-1)+a(n-2)-a(n-3)+a(n-4)+a(n-5)+a(n-6)-a(n-7)-a(n-8) G.f.: -(x^7+2*x^6+x^5-x^4-3*x^3-x^2-x-1)/(x^8+x^7-x^6-x^5-x^4+x^3-x^2-x+1). - Vladimir Baltic, Feb 17 2003
a(n) = F(floor(n/3) + 3)^(n mod 3)*F(floor(n/3) + 2)^(3 - (n mod 3)) where F(n) is the n-th Fibonacci number. - David Nacin, Feb 29 2012

A217694 Number of n-variations of the set {1,2,...,n+1} satisfying p(i)-i in {-2,0,2}, i=1..n (an n-variation of the set N_{n+s} = {1,2,...,n+s} is any 1-to-1 mapping p from the set N_n = {1,2,...,n} into N_{n+s} = {1,2,...,n+s}).

Original entry on oeis.org

1, 1, 2, 4, 8, 12, 21, 35, 60, 96, 160, 260, 429, 693, 1134, 1836, 2992, 4840, 7865, 12727, 20648, 33408, 54144, 87608, 141897, 229593, 371722, 601460, 973560, 1575252, 2549421, 4125051, 6675460, 10801120, 17478176, 28280284, 45761045, 74042925, 119808150
Offset: 0

Views

Author

Vladimir Baltic, Oct 11 2012

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,0,2,-2,-1,-1,-1},{1,1,2,4,8,12,21,35},40] (* Harvey P. Dale, Feb 29 2020 *)

Formula

Recurrence: a(n)=a(n-1)+a(n-2)+2*a(n-4)-2*a(n-5)-a(n-6)-a(n-7)-a(n-8).
G.f.: (1+x^3)/(1-x-x^2-2*x^4+2*x^5+x^6+x^7+x^8) = (1+x)*(1-x+x^2)/((1-x-x^2)*(1+x^2)*(1-x^2-x^4)).

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).

A079997 Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=3, r=3, I={0}.

Original entry on oeis.org

1, 0, 1, 2, 9, 24, 57, 140, 376, 1016, 2692, 7020, 18369, 48344, 127465, 335510, 882081, 2319136, 6100393, 16049440, 42220168, 111053856, 292109320, 768373144, 2021186393, 5316647448, 13985104873, 36786882378, 96765680857, 254536684328
Offset: 0

Views

Author

Vladimir Baltic, Feb 17 2003

Keywords

References

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

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,3,0,6,10,0,-12,-10,-2,0,0,-1,1,1},{1,0,1,2,9,24,57,140,376,1016,2692,7020,18369,48344},40] (* Harvey P. Dale, Nov 27 2013 *)

Formula

a(n) = a(n-1)+3*a(n-2)+6*a(n-4)+10*a(n-5)-12*a(n-7)-10*a(n-8)-2*a(n-9)-a(n-12)+a(n-13)+a(n-14)
G.f.: -(x^8+x^7-x^5-2*x^4+x^3-2*x^2-x+1)/(x^14 +x^13 -x^12 -2*x^9 -10*x^8 -12*x^7 +10*x^5 +6*x^4 +3*x^2 +x-1).

A072852 Number of permutations satisfying i-2<=p(i)<=i+5, i=1..n.

Original entry on oeis.org

1, 2, 6, 18, 54, 162, 454, 1267, 3613, 10344, 29572, 84436, 240868, 686884, 1959636, 5592181, 15957717, 45533682, 129922090, 370708166, 1057755082, 3018154342, 8611878218, 24572725639, 70114579881, 200061418144, 570845362600
Offset: 1

Views

Author

Vladimir Baltic, Jul 25 2002

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(x^14+x^12+x^10+x^8-6x^7-x^6-4x^5-3x^4-2x^3-x^2+1)/(x^21+x^20+ x^17+x^16- 10x^14-10x^13-4x^12-6x^10- 6x^9-4x^8+28x^7+22x^6+ 13x^5+7x^4+4x^3+ 2x^2+x-1),{x,0,30}],x] (* or *) LinearRecurrence[{1,2,4,7,13,22,28,-4,-6,-6,0,-4,-10,-10,0,1,1,0,0,1,1},{1,1,2,6,18,54,162,454,1267,3613,10344,29572,84436,240868,686884,1959636,5592181,15957717,45533682,129922090,370708166},30] (* Harvey P. Dale, Jul 28 2024 *)

Formula

Recurrence: a(n) = a(n - 1) + 2*a(n - 2) + 4*a(n - 3) + 7*a(n - 4) + 13*a(n - 5) + 22*a(n - 6) + 28*a(n - 7) - 4*a(n - 8) - 6*a(n - 9) - 6*a(n - 10) - 4*a(n - 12) - 10*a(n - 13) - 10*a(n - 14) + a(n - 16) + a(n - 17) + a(n - 20) + a(n - 21). G.f.: - (x^14 + x^12 + x^10 + x^8 - 6*x^7 - x^6 - 4*x^5 - 3*x^4 - 2*x^3 - x^2 + 1)/(x^21 + x^20 + x^17 + x^16 - 10*x^14 - 10*x^13 - 4*x^12 - 6*x^10 - 6*x^9 - 4*x^8 + 28*x^7 + 22*x^6 + 13*x^5 + 7*x^4 + 4*x^3 + 2*x^2 + x - 1);

A072853 Number of permutations satisfying i-2<=p(i)<=i+6, i=1..n.

Original entry on oeis.org

1, 2, 6, 18, 54, 162, 486, 1394, 3991, 11593, 33772, 98320, 286072, 831952, 2418664, 7030816, 20441944, 59441521, 172843609, 502580846, 1461344622, 4249102850, 12354982862, 35924300898, 104456501102, 303726483778, 883140022543
Offset: 1

Views

Author

Vladimir Baltic, Jul 25 2002

Keywords

Crossrefs

Formula

Recurrence: a(n)= a(n - 1) + 2*a(n - 2) + 4*a(n - 3) + 8*a(n - 4) + 14*a(n - 5) + 26*a(n - 6) + 44*a(n - 7) + 56*a(n - 8) - 11*a(n - 9) - 19*a(n - 10) - 28*a(n - 11) - 28*a(n - 12) - 8*a(n - 14) - 20*a(n - 15) - 20*a(n - 16) + 5*a(n - 18) + 11*a(n - 19) + 10*a(n - 20) + 2*a(n - 23) + 2*a(n - 24) - a(n - 27) - a(n - 28).
G.f.: - (x^20 + x^18 - 2*x^16 - 2*x^14 - 6*x^12 - 2*x^11 - 4*x^10 - 4*x^9 + 12*x^8 + 2*x^7 + 8*x^6 + 6*x^5 + 4*x^4 + 2*x^3 + x^2 - 1)/(x^28 + x^27 - 2*x^24 - 2*x^23 - 10*x^20 - 11*x^19 - 5*x^18 + 20*x^16 + 20*x^15 + 8*x^14 + 28*x^12 + 28*x^11 + 19*x^10 + 11*x^9 - 56*x^8 - 44*x^7 - 26*x^6 - 14*x^5 - 8*x^4 - 4*x^3 - 2*x^2 - x + 1).

A072854 Number of permutations satisfying i-3<=p(i)<=i+4, i=1..n.

Original entry on oeis.org

1, 2, 6, 24, 96, 330, 1066, 3451, 11581, 39264, 132784, 446460, 1497108, 5023696, 16878488, 56739141, 190697893, 640763258, 2152824662, 7233281108, 24304468132, 81666680202, 274410023170, 922040339607, 3098121457769
Offset: 1

Views

Author

Vladimir Baltic, Jul 25 2002

Keywords

Crossrefs

Formula

Recurrence: a(n) = 3*a(n - 2) + 10*a(n - 3) + 24*a(n - 4) + 58*a(n - 5) + 128*a(n - 6) + 226*a(n - 7) + 164*a(n - 8) + 66*a(n - 9) + 8*a(n - 10) + 50*a(n - 11) - 72*a(n - 12) - 374*a(n - 13) - 640*a(n - 14) - 630*a(n - 15) - 518*a(n - 16) - 390*a(n - 17) - 426*a(n - 18) - 466*a(n - 19) - 216*a(n - 20) + 94*a(n - 21) + 48*a(n - 22) + 22*a(n - 23) + 52*a(n - 24) + 38*a(n - 25) + 48*a(n - 26) + 22*a(n - 27) - 8*a(n - 28) - 2*a(n - 29) - 2*a(n - 31) - a(n - 32) - 2*a(n - 33) - a(n - 34).
G.f.: - (x^27 + x^26 + x^25 - x^24 + 4*x^22 + 4*x^21 - 16*x^20 - 23*x^19 - 29*x^18 + x^17 - 3*x^16 - 20*x^15 - 8*x^14 + 44*x^13 + 56*x^12 + 79*x^11 + 67*x^10 + 63*x^9 + 69*x^8 + 76*x^7 + 36*x^6 + 24*x^5 + 16*x^4 + 7*x^3 + x^2 - x - 1)/(x^34 + 2*x^33 + x^32 + 2*x^31 + 2*x^29 + 8*x^28 - 22*x^27 - 48*x^26 - 38*x^25 - 52*x^24 - 22*x^23 - 48*x^22 - 94*x^21 + 216*x^20 + 466*x^19 + 426*x^18 + 390*x^17 + 518*x^16 + 630*x^15 + 640*x^14 + 374*x^13 + 72*x^12 - 50*x^11 - 8*x^10 - 66*x^9 - 164*x^8 - 226*x^7 - 128*x^6 - 58*x^5 - 24*x^4 - 10*x^3 - 3*x^2 + 1).

A072855 Number of permutations satisfying i-3<=p(i)<=i+5, i=1..n.

Original entry on oeis.org

1, 2, 6, 24, 96, 384, 1374, 4718, 16275, 57749, 206756, 739780, 2637348, 9378840, 33318804, 118439044, 421340612, 1499388117, 5335199213, 18980987054, 67522942850, 240204885524, 854523535096, 3040023558788, 10815153542594
Offset: 1

Views

Author

Vladimir Baltic, Jul 25 2002

Keywords

Crossrefs

Formula

G.f.: -(1- 2*x^2 - 7*x^3 - 16*x^4 - 28*x^5 - 32*x^6 - 58*x^7 - 156*x^8 + 67*x^9 + 76*x^10 + 68*x^11 + 145*x^12 + 12*x^13 + 156*x^14 + 180*x^15 + 704*x^16 + 344*x^17 - 454*x^18 - 276*x^19 - 480*x^20 + 158*x^21 - 260*x^22 - 116*x^23 - 780*x^24 - 756*x^25 + 168*x^26 + 206*x^27 + 900*x^28 - 340*x^29 + 126*x^30 + 132*x^31 + 276*x^32 + 28*x^33 + 16*x^34 + 24*x^35 - 107*x^36 + 36*x^37 - 14*x^38 - 7*x^39 - 28*x^40 - 4*x^42 - 2*x^43 + 4*x^44 - x^45 + x^48) / (-1 + x + 3*x^2 + 8*x^3 + 20*x^4 + 46*x^5 + 114*x^6 + 242*x^7 + 354*x^8 - 250*x^9 - 490*x^10 - 660*x^11 - 496*x^12 - 24*x^13 - 1242*x^14 - 2430*x^15 - 2270*x^16 - 566*x^17 + 2241*x^18 + 5071*x^19 + 4259*x^20 - 632*x^21 + 1392*x^22 + 6396*x^23 + 5596*x^24 - 132*x^25 + 1316*x^26 - 6220*x^27 - 11116*x^28 + 736*x^29 + 344*x^30 - 5128*x^31 - 3684*x^32 + 1148*x^33 - 388*x^34 + 980*x^35 + 1665*x^36 + 239*x^37 - 199*x^38 + 688*x^39 + 540*x^40 - 106*x^41 + 50*x^42 - 78*x^43 - 102*x^44 - 58*x^45 + 22*x^46 - 44*x^47 - 40*x^48 - 2*x^50 + 2*x^51 + 2*x^52 + 2*x^53 - x^54 + x^55 + x^56). - Vaclav Kotesovec, Dec 01 2012

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

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 3, 3, 4, 6, 9, 12, 16, 24, 33, 46, 64, 91, 127, 177, 249, 349, 489, 684, 960, 1345, 1884, 2640, 3700, 5185, 7264, 10180, 14265, 19989, 28009, 39249, 54999, 77067, 107992, 151326, 212049, 297136, 416368, 583444, 817561, 1145622, 1605324, 2249491, 3152139, 4416993
Offset: 0

Views

Author

Vladimir Baltic, Jan 24 2003

Keywords

Comments

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

References

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

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,1,1,1,0,-1},{1,0,0,1,1,1},60] (* Harvey P. Dale, Aug 08 2019 *)

Formula

Recurrence: a(n) = a(n-2)+a(n-3)+a(n-4)-a(n-6).
G.f.: -(x^2-1)/(x^6-x^4-x^3-x^2+1)
Previous Showing 11-20 of 77 results. Next