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 21-30 of 30 results.

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

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

Original entry on oeis.org

1, 10, 94, 886, 8350, 78694, 741646, 6989590, 65872894, 620814406, 5850821230, 55140648694, 519669123166, 4897584703270, 46156938822094, 435002788211926, 4099652849195710, 38636886795609094, 364130592557264686, 3431722880197818550, 32342028292009425694
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, 4}, {1, 10}, 30]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 10][n]
     return 9*a(n-1)+4*a(n-2)

Formula

a(n) = 9*a(n-1) + 4*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 4*x^2).
a(n) = ((1 - 11/sqrt(97))/2)*((9 - sqrt(97))/2)^n + ((1 + 11/sqrt(97))/2)*((9 + sqrt(97))/2)^n.
a(n) = A015580(n)+A015580(n+1). - R. J. Mathar, Oct 20 2019

A287832 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 1.

Original entry on oeis.org

1, 11, 101, 929, 8545, 78599, 722973, 6650087, 61169169, 562649373, 5175390189, 47604538285, 437878494689, 4027716327495, 37047945974857, 340776308298291, 3134546038698889, 28832341420057365, 265207115001514409, 2439441626426418609, 22438596523731989473
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{11, -14, -28, 39, 9, -10}, {1, 11, 101, 929, 8545, 78599, 722973}, 20]
  • Python
    def a(n):
     if n in [0,1,2,3,4,5,6]:
      return [1, 11, 101, 929, 8545, 78599, 722973][n]
     return 11*a(n-1) - 14*a(n-2) - 28*a(n-3) + 39*a(n-4) + 9*a(n-5) - 10*a(n-6)

Formula

For n>6, a(n) = 11*a(n-1) - 14*a(n-2) - 28*a(n-3) + 39*a(n-4) + 9*a(n-5) - 10*a(n-6), a(0)=1, a(1)=11, a(2)=101, a(3)=929, a(4)=8545, a(5)=78599, a(6)=722973.
G.f.: (1 - 6*x^2 + 9*x^4 - 2*x^6)/(1 - 11*x + 14*x^2 + 28*x^3 - 39*x^4 - 9*x^5 + 10*x^6).

A287833 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 2.

Original entry on oeis.org

1, 11, 103, 967, 9079, 85243, 800351, 7514541, 70554457, 662439857, 6219685951, 58396989455, 548292695881, 5147951686649, 48334414751849, 453814602701801, 4260891430727991, 40005754941255473, 375616336261903907, 3526683405274793053, 33112233522155404139
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, -2, -37, 16, 19, 1}, {1, 11, 103, 967, 9079, 85243}, 20]
  • Python
    def a(n):
     if n in [0,1,2,3,4,5]:
      return [1, 11, 103, 967, 9079, 85243][n]
     return 10*a(n-1) - 2*a(n-2) - 37*a(n-3) + 16*a(n-4) + 19*a(n-5) + a(n-6)

Formula

a(n) = 10*a(n-1) - 2*a(n-2) - 37*a(n-3) + 16*a(n-4) + 19*a(n-5) + a(n-6), a(0)=1, a(1)=11, a(2)=103, a(3)=967, a(4)=9079, a(5)=85243.
G.f.: (-1 - x + 5*x^2 + 4*x^3 - 6*x^4 - 3*x^5)/(-1 + 10*x - 2*x^2 - 37*x^3 + 16*x^4 + 19*x^5 + x^6).

A287834 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 3.

Original entry on oeis.org

1, 11, 105, 1005, 9621, 92105, 881753, 8441329, 80811789, 773639469, 7406320733, 70903294113, 678781988705, 6498216958121, 62209699634757, 595555173609653, 5701457600593525, 54582044135967257, 522532964509030377, 5002390498942001761, 47889630709552579709
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, -2, -21, 10}, {1, 11, 105, 1005, 9621}, 20]
  • Python
    def a(n):
     if n in [0,1,2,3,4]:
      return [1, 11, 105, 1005, 9621][n]
     return 10*a(n-1) - 2*a(n-2) - 21*a(n-3) + 10*a(n-4)

Formula

a(n) = 10*a(n-1) - 2*a(n-2) - 21*a(n-3) + 10*a(n-4), a(0)=1, a(1)=11, a(2)=105, a(3)=1005, a(4)=9621.
G.f.: (-1 - x + 3*x^2 + 2*x^3 - 2*x^4)/(-1 + 10*x - 2*x^2 - 21*x^3 + 10*x^4).

A287835 Number of words of length n over the alphabet {0,1,...,10} such that no two consecutive terms have distance 4.

Original entry on oeis.org

1, 11, 107, 1043, 10169, 99149, 966719, 9425675, 91901945, 896059709, 8736735695, 85184670011, 830565128489, 8098152315149, 78958372642847, 769857662314475, 7506244118089817, 73187166301583837, 713587411625345903, 6957599532298617755, 67837787583138657929
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, -1, -14}, {1, 11, 107, 1043}, 20]
  • Python
    def a(n):
     if n in [0,1,2,3]:
      return [1, 11, 107, 1043][n]
     return 10*a(n-1) - a(n-2) - 14*a(n-3)

Formula

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

A287836 Number of words over the alphabet {0,1,...,10} such that no two consecutive terms have distance 5.

Original entry on oeis.org

1, 11, 109, 1081, 10721, 106329, 1054553, 10458881, 103729441, 1028771337, 10203182953, 101193470929, 1003620008177, 9953736259545, 98719500126905, 979083577381409, 9710388021269185, 96306012787788969, 955147011506293513, 9472989143467878769, 93951530216004879761
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{10, 1, -18}, {1, 11, 109, 1081}, 20]
  • Python
    def a(n):
     if n in [0,1,2,3]:
      return [1, 11, 109, 1081][n]
     return 10*a(n-1) + a(n-2) - 18*a(n-3)

Formula

For n>3, a(n) = 10*a(n-1) + a(n-2) - 18*a(n-3), a(0)=1, a(1)=11, a(2)=109, a(3)=1081.
G.f.: (1 + x - 2*x^2 - 2*x^3)/(1 - 10*x - x^2 + 18*x^3).

A287837 Number of words over the alphabet {0,1,...,10} such that no two consecutive terms have distance 7.

Original entry on oeis.org

1, 11, 113, 1163, 11969, 123179, 1267697, 13046507, 134268161, 1381821131, 14221015793, 146355621323, 1506219260609, 15501259470059, 159531252482417, 1641816303234347, 16896756789790721, 173893016807610251, 1789620438445474673, 18417883434877577483
Offset: 0

Views

Author

David Nacin, Jun 07 2017

Keywords

Comments

In general, the number of sequences on {0,1,...,10} such that no two consecutive terms have distance 6+k for k in {0,1,2,3,4} has generating function (-1 - x)/(-1 + 10*x + (2*k+1)*x^2).

Crossrefs

Programs

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

Formula

For n>2, a(n) = 10*a(n-1) + 3*a(n-2), a(0)=1, a(1)=11, a(2)=113.
G.f.: (-1 - x)/(-1 + 10*x + 3*x^2).
a(n) = A015588(n)+A015588(n+1). - R. J. Mathar, Oct 20 2019
Previous Showing 21-30 of 30 results.