A186830 Keith sequence for the number 197.
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
Links
- M. Klazar and F. Luca, Counting Keith numbers, Journal of Integer Sequences, Vol. 10 (2007), #07.2.2.
- Eric Weisstein's World of Mathematics, Keith Number
- Index entries for linear recurrences with constant coefficients, signature (1,1,1).
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]
Comments