login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320122 Numbers that are not Keith numbers in any base. 0

%I #30 Mar 21 2023 15:35:14

%S 12,30,390,1170,1200,1560,2340,2760,3120,3900,4680,6120,6240,7680,

%T 7800,8460,10020,10140,10950,11580,15090,15480,17160,17580,18360,

%U 19140,20280,20700,20940,21480,23040,23280,24060,24210,24960,26550,28740,29250,29520,29670,30060,31080,32400

%N Numbers that are not Keith numbers in any base.

%C 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.

%H Arie Bos, <a href="https://www.researchgate.net/publication/280932154_Inventory_of_n-step_Fibonacci_sequences">Inventory of n-step Fibonacci sequences</a>, 2015.

%e 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.

%e For example, with b = 2, the sequence is : 1, 1, 0, 0, 2, 3, 5, 10, 20, ...; it doesn't contain 12. See A251703.

%p fibo:=proc(n, b) local L,m,M,k:

%p L:=convert(n,base,b):m:=nops(L):M:=seq(L[m+1-k],k=1..m):

%p while M[m]<n do M:=M,add(M[q],q=1..m): M:=seq(M[q],q=2..m+1) od:

%p if M[m]=n then true else false fi end:

%p test:=proc(n) local b:

%p for b from 2 to n do if fibo(n, b) then return(true) fi od:

%p return(false) end:

%p L:=NULL:for n from 2 to 1200 do if not(test(n)) then L:=L,n fi od:L;

%o (Python)

%o def digits(n, b):

%o r = []

%o m = n

%o while m > 0:

%o r = [m % b] + r

%o m = m // b

%o return r

%o def fibo(n, b):

%o L = digits(n, b)

%o m = len(L) - 1

%o while L[m] < n:

%o L.append(sum(k for k in L))

%o L.pop(0)

%o return L[m] == n

%o def test(n):

%o for b in range(2, n + 1):

%o if fibo(n, b):

%o return True

%o return False

%o print([n for n in range(2, 2001) if not test(n)])

%o (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

%o isok(n) = if (n<=2, 0, for(b=2, n-1, if (iskb(n, b), return(0))); return (1)); \\ _Michel Marcus_, Oct 08 2018

%Y Cf. A007629 (Keith numbers in base 10).

%K nonn,base

%O 1,1

%A _Robert FERREOL_, Oct 06 2018

%E More terms from _Michel Marcus_, Oct 08 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 15:15 EDT 2024. Contains 372197 sequences. (Running on oeis4.)