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 14 results. Next

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

Original entry on oeis.org

1, 11, 117, 1247, 13289, 141619, 1509213, 16083463, 171399121, 1826575451, 19465548357, 207441511727, 2210673955769, 23558830139779, 251063019088173, 2675542001860183, 28512861152219041, 303857405535211691, 3238164083417650197, 34508642672922983807
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

  • Maple
    a:=proc(n) option remember; if n=0 then 1 elif n=1 then 11 elif n=2 then 117 else 10*a(n-1)+7*a(n-2); fi; end: seq(a(n), n=0..30); # Wesley Ivan Hurt, Nov 25 2017
  • Mathematica
    LinearRecurrence[{10, 7}, {1, 11, 117}, 20]
  • PARI
    Vec((1 + x) / (1 - 10*x - 7*x^2) + O(x^30)) \\ Colin Barker, Nov 25 2017
  • Python
    def a(n):
     if n in [0,1,2]:
      return [1, 11, 117][n]
     return 10*a(n-1) + 7*a(n-2)
    

Formula

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

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

Original entry on oeis.org

1, 10, 96, 924, 8892, 85572, 823500, 7924932, 76265388, 733938084, 7063035084, 67970944260, 654116708844, 6294876045156, 60578584659468, 582976518206148, 5610260171812140, 53990200655546148, 519573366930788172, 5000101506310370436, 48118353758378062956
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, 6}, {1, 10}, 30]
  • Python
    def a(n):
     if n in [0, 1]:
      return [1, 10][n]
     return 9*a(n-1)+6*a(n-2)

Formula

a(n) = 9*a(n-1) + 6*a(n-2), a(0)=1, a(1)=10.
G.f.: (-1 - x)/(-1 + 9*x + 6*x^2).
a(n) = ((1 - 11/sqrt(105))/2)*((9 - sqrt(105))/2)^n + ((1 + 11/sqrt(105))/2)*((9 + sqrt(105))/2)^n.

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

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

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