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.

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).