login
A186830
Keith sequence for the number 197.
3
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, 240085707, 441586461, 812204129, 1493876297, 2747666887, 5053747313
OFFSET
1,2
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
LINKS
Martin Klazar and Florian Luca, Counting Keith numbers, Journal of Integer Sequences, Vol. 10 (2007), Article 07.2.2.
Eric Weisstein's World of Mathematics, Keith Number.
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
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 *)
LinearRecurrence[{1, 1, 1}, {1, 9, 7}, 36] (* Amiram Eldar, Jan 20 2026 *)
PROG
(PARI) Vec((1+8*x-3*x^2)/(1-x-x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Feb 04 2013
CROSSREFS
Cf. A007629.
Sequence in context: A131724 A393103 A190995 * A124050 A107663 A298780
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Feb 27 2011
EXTENSIONS
a(31)-a(36) from Amiram Eldar, Jan 20 2026
STATUS
approved