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

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

Original entry on oeis.org

1, 11, 115, 1205, 12625, 132275, 1385875, 14520125, 152130625, 1593906875, 16699721875, 174966753125, 1833166140625, 19206495171875, 201230782421875, 2108340300078125, 22089556912890625, 231437270629296875, 2424820490857421875, 25405391261720703125
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, 5}, {1, 11, 115}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 5*x^2) + O(x^40)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 115][n]
     return 10*a(n-1) + 5*a(n-2)
    

Formula

For n > 2, a(n) = 10*a(n-1) + 5*a(n-2), a(0)=1, a(1)=11, a(2)=115.
G.f.: (-1 - x)/(-1 + 10*x + 5*x^2).
a(n) = (((5-sqrt(30))^n*(-6+sqrt(30)) + (5+sqrt(30))^n*(6+sqrt(30)))) / (2*sqrt(30)). - Colin Barker, Nov 25 2017

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