This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A001690 Non-Fibonacci numbers. (Formerly M3268 N1319) 31

%I M3268 N1319

%S 4,6,7,9,10,11,12,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,

%T 32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,

%U 57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78

%N Non-Fibonacci numbers.

%C A010056(a(n)) = 0. - _Reinhard Zumkeller_, Oct 10 2013

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A001690/b001690.txt">Table of n, a(n) for n = 1..1000</a>

%H Bakir Farhi, <a href="http://arxiv.org/abs/1105.1127">An explicit formula generating the non-Fibonacci numbers</a>, arXiv:1105.1127 [math.NT], May 05 2011.

%H H. W. Gould, <a href="http://www.fq.math.ca/Scanned/3-3/gould.pdf">Non-Fibonacci numbers</a>, Fib. Quart., 3 (1965), pp. 177-183.

%F a(n-1) = floor(n + lgg(sqrt(5)*(lgg(sqrt(5)*n)+n) - 5 + 3/n) - 2) where lgg(x) = log(x)/log((sqrt(5)+1)/2), given by Farhi. - _Jonathan Vos Post_, May 05 2011

%F a(n) ~ n. - _Charles R Greathouse IV_, Nov 06 2014

%F a(n) = floor(1/2 - LambertW(-1, -log(phi)/(sqrt(5)*phi^(n - 3/2)))/log(phi)) with phi = (1 + sqrt(5))/2 [Nicolas Normand (Nantes)]. - _Simon Plouffe_, Nov 29 2017 [abs removed by _Peter Luschny_, Nov 30 2017]

%p a:=proc(n) floor(-LambertW(-1, -1/5*ln(1/2+1/2*5^(1/2))*5^(1/2) /((1/2+1/2*5^(1/2))^(n-3/2))) /ln(1/2+1/2*5^(1/2))+1/2) end:

%p seq(a(n), n=1..69); # _Simon Plouffe_, Nov 29 2017

%p # alternative

%p isA000045 := proc(n)

%p for k from 0 do

%p if A000045(k) = n then

%p return true;

%p elif A000045(k) > n then

%p return false;

%p end if;

%p end do:

%p end proc:

%p A001690 := proc(n)

%p option remember;

%p if n = 1 then

%p 4 ;

%p else

%p for a from procname(n-1)+1 do

%p if not isA000045(a) then

%p return a;

%p end if;

%p end do:

%p end if;

%p end proc:

%p seq(A001690(n),n=1..100) ; # _R. J. Mathar_, Feb 01 2019

%t Complement[Range[Fibonacci[a = 20]], Fibonacci[Range[a]]] (* _Vladimir Joseph Stephan Orlovsky_, Jul 01 2011 *)

%t a[n_] := With[{phi = (1 + Sqrt[5])/2}, Floor[1/2 - LambertW[-1, -Log[phi]/(Sqrt[5] phi^(n - 3/2))]/Log[phi]]];

%t Table [a[n], {n, 1, 70}] (* _Peter Luschny_, Nov 30 2017 *)

%o (PARI) lgg(x)=log(x)/log((sqrt(5)+1)/2);

%o a(n)=n++;floor(n+lgg(sqrt(5)*(lgg(sqrt(5)*n)+n)-5+3/n)-2);

%o vector(66,n,a(n)) /* _Joerg Arndt_, May 14 2011 */

%o (PARI) lower=3;upper=5; for(i=4,20,for(n=lower+1,upper-1,print1(n", ")); [lower,upper]=[upper,lower+upper]) \\ _Charles R Greathouse IV_, Nov 19 2013

%o a001690 n = a001690_list !! (n-1)

%o a001690_list = filter ((== 0) . a010056) [0..]

%o -- _Reinhard Zumkeller_, Oct 10 2013

%o (Python)

%o def f(n):

%o a=1

%o b=2

%o c=3

%o while n>0:

%o a=b

%o b=c

%o c=a+b

%o n-=(c-b-1)

%o n+=(c-b-1)

%o return (b+n)

%o for i in range(1,1001):

%o print str(i)+" "+str(f(i)) \\ _Indranil Ghosh_, Dec 22 2016

%Y The nonnegative integers that are not in A000045.

%Y Cf. A010056.

%K nonn,easy,nice,changed

%O 1,1

%A _N. J. A. Sloane_

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

Last modified May 23 11:20 EDT 2019. Contains 323514 sequences. (Running on oeis4.)