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.

A186830 Keith sequence for the number 197.

Original entry on oeis.org

1, 9, 7, 17, 33, 57, 107, 197, 361, 665, 1223, 2249, 4137, 7609, 13995, 25741, 47345, 87081, 160167, 294593, 541841, 996601, 1833035, 3371477, 6201113, 11405625, 20978215, 38584953, 70968793, 130531961
Offset: 1

Views

Author

N. J. A. Sloane, Feb 27 2011

Keywords

Comments

This sequence illustrates why 197 is a Keith number (cf. A007629).
Other multiples of 197 in the sequence are 4137 and 992207243244533. - Alonso del Arte, Mar 14 2011

Crossrefs

Cf. A007629.

Programs

  • Mathematica
    keithSeq[n_Integer, b_:10, goBeyondN_:0] := Module[{seq = IntegerDigits[n, b], ord, max = n + goBeyondN, curr}, ord = Length[seq]; curr = seq[[-1]]; While[curr < max, curr = Plus@@Take[seq, -ord]; seq = Append[seq, curr]]; Return[seq]]; keithSeq[197, 10, 10^8] (* Alonso del Arte, Mar 14 2011 *)
  • PARI
    Vec((1+8*x-3*x^2)/(1-x-x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Feb 04 2013

Formula

a(1)=1, a(2)=9, a(3)=7; thereafter a(n) = sum of previous three terms. Note that 197 appears in the sequence, which is why 197 is a Keith number.
G.f.: x*(1+8*x-3*x^2)/(1-x-x^2-x^3). [Colin Barker, Jun 19 2012]