OFFSET
1,1
COMMENTS
A number N >= 2 is a Keith number in a base b <= N if the Fibonacci sequence u(i) whose initial terms are the t digits of N in the base b, and later terms are given by rule that u(i) = sum of t previous terms, contains N itself. Here a(n) is the n-th number N that is not a Keith number in any base b <= N.
LINKS
Arie Bos, Inventory of n-step Fibonacci sequences, 2015.
EXAMPLE
a(1) = 12 because 12 is not a Keith number in any base from 2 to 12, while all previous numbers are in some base.
For example, with b = 2, the sequence is : 1, 1, 0, 0, 2, 3, 5, 10, 20, ...; it doesn't contain 12. See A251703.
MAPLE
fibo:=proc(n, b) local L, m, M, k:
L:=convert(n, base, b):m:=nops(L):M:=seq(L[m+1-k], k=1..m):
while M[m]<n do M:=M, add(M[q], q=1..m): M:=seq(M[q], q=2..m+1) od:
if M[m]=n then true else false fi end:
test:=proc(n) local b:
for b from 2 to n do if fibo(n, b) then return(true) fi od:
return(false) end:
L:=NULL:for n from 2 to 1200 do if not(test(n)) then L:=L, n fi od:L;
PROG
(Python)
def digits(n, b):
r = []
m = n
while m > 0:
r = [m % b] + r
m = m // b
return r
def fibo(n, b):
L = digits(n, b)
m = len(L) - 1
while L[m] < n:
L.append(sum(k for k in L))
L.pop(0)
return L[m] == n
def test(n):
for b in range(2, n + 1):
if fibo(n, b):
return True
return False
print([n for n in range(2, 2001) if not test(n)])
(PARI) iskb(n, b) = if(n<b, return(0)); my(v=digits(n, b), t=#v); while(v[#v]<n, v=concat(v, sum(i=0, t-1, v[#v-i]))); v[#v]==n; \\ after A007629
isok(n) = if (n<=2, 0, for(b=2, n-1, if (iskb(n, b), return(0))); return (1)); \\ Michel Marcus, Oct 08 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert FERREOL, Oct 06 2018
EXTENSIONS
More terms from Michel Marcus, Oct 08 2018
STATUS
approved