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 41-50 of 57 results. Next

A287813 Number of octonary sequences of length n such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 8, 52, 340, 2224, 14548, 95164, 622504, 4072036, 26636740, 174241072, 1139777284, 7455717772, 48770692552, 319027694548, 2086881784180, 13651089405616, 89296980486772, 584125595190556, 3820988224873576, 24994540788543364, 163498820845182820
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 64 - 12 = 52 sequences contain every combination except these twelve: 02,20,13,31,24,42,35,53,46,64,57,75.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7, -3}, {1, 8, 52}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2]:
      return [1, 8, 52][n]
     return 7*a(n-1)-3*a(n-2)

Formula

For n>2, a(n) = 7*a(n-1) - 3*a(n-2), a(0)=1, a(1)=8, a(2)=52.
G.f.: (1 + x - x^2)/(1 - 7 x + 3 x^2).
a(n) = A190972(n) + A190972(n+1) - A190972(n-1). - R. J. Mathar, Oct 20 2019

A287814 Number of octonary sequences of length n such that no two consecutive terms have distance 3.

Original entry on oeis.org

1, 8, 54, 366, 2482, 16834, 114178, 774426, 5252642, 35626714, 241642738, 1638972746, 11116542082, 75399367194, 511405842898, 3468675479466, 23526734684322, 159573084361274, 1082324835734258, 7341006503296586, 49791314679463362, 337715954398900954
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 64 - 10 = 54 sequences contain every combination except these ten: 03,30,14,41,25,52,36,63,47,74.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7, 0, -10}, {1, 8, 54, 366}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2, 3]:
      return [1, 8, 54, 366][n]
     return 7*a(n-1)-10*a(n-3)

Formula

For n>3, a(n) = 7*a(n-1) - 10*a(n-3), a(0)=1, a(1)=8, a(2)=54, a(3)=366.
G.f.: (1 + x - 2 x^2 - 2 x^3)/(1 - 7 x + 10 x^3).

A287815 Number of octonary sequences of length n such that no two consecutive terms have distance 7.

Original entry on oeis.org

1, 8, 62, 482, 3746, 29114, 226274, 1758602, 13667858, 106226618, 825593474, 6416514026, 49869159026, 387583197338, 3012297335522, 23411580532682, 181954847741906, 1414153417389434, 10990803008177474, 85420541561578922, 663888608980117298, 5159743512230294618
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 64 - 2 = 62 sequences contain every combination except these two: 07,70.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7, 6}, {1, 8}, 40]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 8][n]
     return 7*a(n-1)+6*a(n-2)

Formula

a(n) = 7*a(n-1) + 6*a(n-2), a(0)=1, a(1)=8.
G.f.: (-1 - x)/(-1 + 7 x + 6 x^2).
a(n) = A015564(n)+A015564(n+1). - R. J. Mathar, Oct 20 2019

A287816 Number of nonary sequences of length n such that no two consecutive terms have distance 1.

Original entry on oeis.org

1, 9, 65, 471, 3413, 24733, 179233, 1298853, 9412437, 68209395, 494295113, 3582023557, 25957960001, 188110345129, 1363185009337, 9878634630295, 71587804656589, 518777540353453, 3759441118026705, 27243657291488469, 197427447142906157, 1430703538380753875
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 81 - 16 = 65 sequences contain every combination except these sixteen: 01,10,12,21,23,32,34,43,45,54,56,65,67,76,78,87.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -11, -15, 19, 1}, {1, 9, 65 , 471, 3413}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2, 3, 4]:
      return [1, 9, 65 , 471, 3413][n]
     return 9*a(n-1)-11*a(n-2)-15*a(n-3)+19*a(n-4)+a(n-5)

Formula

a(n) = 9*a(n-1) - 11*a(n-2) - 15*a(n-3) + 19*a(n-4) + a(n-5), a(0)=1, a(1)=9, a(2)=65, a(3)=471, a(4)=3413.
G.f: (-1 + 5 x^2 - 5 x^4)/(-1 + 9 x - 11 x^2 - 15 x^3 + 19 x^4 + x^5).

A287817 Number of nonary sequences of length n such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 9, 67, 501, 3747, 28025, 209609, 1567743, 11725731, 87701095, 655949055, 4906086571, 36694443381, 274451368893, 2052723708275, 15353082914309, 114831408642039, 858866749063989, 6423783365292409, 48045861327359751, 359352839194448551, 2687733333725785179
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 81 - 14 = 67 sequences contain every combination except these fourteen: 02,20,13,31,24,42,35,53,46,64,57,75,68,86.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8, -1, -23, 10, 1}, {1, 9, 67 , 501, 3747}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2, 3, 4]:
      return [1, 9, 67 , 501, 3747][n]
     return 8*a(n-1)-a(n-2)-23*a(n-3)+10*a(n-4)+a(n-5)

Formula

a(n) = 8*a(n-1) - 1*a(n-2) - 23*a(n-3) + 10*a(n-4) + a(n-5), a(0)=1, a(1)=9, a(2)=67, a(3)=501, a(4)=3747.
G.f: (-1 - x + 4 x^2 + 3 x^3 - 3 x^4)/(-1 + 8 x - x^2 - 23 x^3 + 10 x^4 + x^5).

A287818 Number of nonary sequences of length n such that no two consecutive terms have distance 3.

Original entry on oeis.org

1, 9, 69, 531, 4089, 31491, 242529, 1867851, 14385369, 110789811, 853254609, 6571393371, 50609994249, 389776014531, 3001884188289, 23119197549291, 178053936060729, 1371293449053651, 10561101680875569, 81336980637343611, 626421808927336809, 4824426473972595171
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Examples

			For n=2 the a(2) = 81 - 12 = 69 sequences contain every combination except these twelve: 03,30,14,41,25,52,36,63,47,74,58,85.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -10}, {1, 9, 69}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2]:
      return [1, 9, 69][n]
     return 9*a(n-1)-10*a(n-2)

Formula

For n>2, a(n) = 9*a(n-1) - 10*a(n-2), a(0)=1, a(1)=9, a(2)=69.
G.f.: (1 - 2 x^2)/(1 - 9 x + 10 x^2).
For n>0, a(n)=(1/5)(3 - 18/sqrt(41))*((9 - sqrt(41))/2)^n + (1/5)(3 + 18/sqrt(41))*((9 + sqrt(41))/2)^n.
a(n) = A178869(n+1)-2*A178869(n-1). - R. J. Mathar, Oct 20 2019

A287826 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 10, 84, 708, 5968, 50308, 424080, 3574860, 30134944, 254028100, 2141377008, 18051134892, 152165391616, 1282706408548, 10812811724688, 91148603152524, 768354066287200, 6476983198439812, 54598931916359472, 460251829451302764, 3879778213203474880
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, -13, -2}, {1, 10, 84}, 40]
  • Python
    def a(n):
     if n in [0, 1, 2]:
      return [1, 10, 84][n]
     return 10*a(n-1)-13*a(n-2)-2*a(n-3)

Formula

a(n) = 10*a(n-1) - 13*a(n-2) - 2a(n-3), a(0)=1, a(1)=10, a(2)=84.
G.f.: (1 - 3 x^2)/(1 - 10 x + 13 x^2 + 2 x^3).

A287827 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 3.

Original entry on oeis.org

1, 10, 86, 742, 6404, 55274, 477082, 4117804, 35541714, 306768722, 2647791524, 22853698754, 197255539962, 1702558017644, 14695170558994, 126837403201602, 1094762853302164, 9449150445514434, 81557794797885642, 703944119701429084, 6075903902137709074
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -1, -20, 10}, {1, 10, 86, 742, 6404}, 30]
  • Python
    def a(n):
     if n in [0, 1, 2, 3, 4]:
      return [1, 10, 86, 742, 6404][n]
     return 9*a(n-1)-a(n-2)-20*a(n-3)+10*a(n-4)

Formula

For n>4, a(n) = 9*a(n-1) - a(n-2) - 20*a(n-3) + 10*a(n-4), a(0)=1, a(1)=10, a(2)=86, a(3)=742, a(4)=6404.
G.f.: (-1 - x + 3*x^2 + 2*x^3 - 2*x^4)/(-1 + 9*x - x^2 - 20*x^3 + 10*x^4).

A287828 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 4.

Original entry on oeis.org

1, 10, 88, 776, 6844, 60364, 532412, 4695892, 41417932, 365307620, 3222026092, 28418383780, 250651147340, 2210751960772, 19498910274028, 171981076403492, 1516879160180620, 13378927697789188, 118002614210453804, 1040787219651555556, 9179779989094951372
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, 0, -14}, {1, 10, 88, 776}, 30]
  • Python
    def a(n):
     if n in [0, 1, 2, 3]:
      return [1, 10, 88, 776][n]
     return 9*a(n-1)-14*a(n-3)

Formula

For n>3, a(n) = 9*a(n-1) - 14*a(n-3), a(0)=1, a(1)=10, a(2)=88, a(3)=776.
G.f.: (1 + x - 2*x^2 - 2*x^3)/(1 - 9*x + 14*x^3).

A287829 Number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 6.

Original entry on oeis.org

1, 10, 92, 848, 7816, 72040, 663992, 6120008, 56408056, 519912520, 4792028792, 44168084168, 407096815096, 3752207504200, 34584061167992, 318760965520328, 2938016812018936, 27079673239211080, 249593092776937592, 2300497181470860488, 21203660818791619576
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Comments

In general, the number of sequences over the alphabet {0,1,...,9} such that no two consecutive terms have distance 5+k for k in {0,1,2,3,4} is given by a(n) = 9*a(n-1) + 2*k*a(n-2), a(0)=1, a(1)=10.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, 2}, {1, 10}, 30]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 10][n]
     return 9*a(n-1)+2*a(n-2)

Formula

a(n) = 9*a(n-1) + 2*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 2*x^2).
a(n) = ((1 - 11/sqrt(89))/2)*((9 - sqrt(89))/2)^n + ((1 + 11/sqrt(89))/2)*((9 + sqrt(89))/2)^n.
a(n) = A015579(n)+A015579(n+1). - R. J. Mathar, Oct 20 2019
Previous Showing 41-50 of 57 results. Next