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

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

Original entry on oeis.org

1, 10, 82, 674, 5540, 45538, 374316, 3076828, 25291120, 207889674, 1708825732, 14046322404, 115458919774, 949057110644, 7801124426174, 64124215108032, 527092600834054, 4332631742719370, 35613662169258228, 292739611493034596, 2406281042646218328
Offset: 0

Views

Author

David Nacin, Jun 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{9, -4, -21, 9, 5}, {1, 10, 82, 674, 5540, 45538}, 40]
  • Python
    def a(n):
        if n in [0, 1, 2, 3, 4, 5]:
            return [1, 10, 82, 674, 5540, 45538][n]
        return 9*a(n-1) - 4*a(n-2) - 21*a(n-3) + 9*a(n-4) + 5*a(n-5)

Formula

For n>5, a(n) = 9*a(n-1) - 4*a(n-2) - 21*a(n-3) + 9*a(n-4) + 5*a(n-5), a(0)=1, a(1)=10, a(2)=82, a(3)=674, a(4)=5540, a(5)=45538.
G.f.: (-1 - x + 4*x^2 + 3*x^3 - 3*x^4 - x^5)/(-1 + 9*x - 4*x^2 - 21*x^3 + 9*x^4 + 5*x^5).

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