cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A001690 Non-Fibonacci numbers.

This page as a plain text file.
%I A001690 M3268 N1319 #91 Jan 05 2025 19:51:32
%S A001690 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 A001690 32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,
%U A001690 57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78
%N A001690 Non-Fibonacci numbers.
%C A001690 A010056(a(n)) = 0. - _Reinhard Zumkeller_, Oct 10 2013
%D A001690 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001690 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001690 T. D. Noe, <a href="/A001690/b001690.txt">Table of n, a(n) for n = 1..1000</a>
%H A001690 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 A001690 H. W. Gould, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/3-3/gould.pdf">Non-Fibonacci numbers</a>, Fib. Quart., 3 (1965), pp. 177-183.
%F A001690 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 A001690 a(n) ~ n. - _Charles R Greathouse IV_, Nov 06 2014
%F A001690 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 A001690 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 A001690 seq(a(n), n=1..69); # _Simon Plouffe_, Nov 29 2017
%p A001690 # alternative
%p A001690 isA000045 := proc(n)
%p A001690     for k from 0 do
%p A001690         if A000045(k) = n then
%p A001690             return true;
%p A001690         elif A000045(k) > n then
%p A001690             return false;
%p A001690         end if;
%p A001690     end do:
%p A001690 end proc:
%p A001690 A001690 := proc(n)
%p A001690     option remember;
%p A001690     if n = 1 then
%p A001690         4 ;
%p A001690     else
%p A001690         for a from procname(n-1)+1 do
%p A001690             if not isA000045(a) then
%p A001690                 return a;
%p A001690             end if;
%p A001690         end do:
%p A001690     end if;
%p A001690 end proc:
%p A001690 seq(A001690(n),n=1..100) ; # _R. J. Mathar_, Feb 01 2019
%p A001690 # third Maple program:
%p A001690 q:= n-> (t-> issqr(t+4) or issqr(t-4))(5*n^2):
%p A001690 remove(q, [$1..100])[]; # _Alois P. Heinz_, Jun 05 2019
%t A001690 Complement[Range[Fibonacci[a = 12]], Fibonacci[Range[a]]] (* _Vladimir Joseph Stephan Orlovsky_, Jul 01 2011 *)
%t A001690 a[n_] := With[{phi = (1 + Sqrt[5])/2}, Floor[1/2 - LambertW[-1, -Log[phi]/(Sqrt[5] phi^(n - 3/2))]/Log[phi]]];
%t A001690 Table [a[n], {n, 1, 70}] (* _Peter Luschny_, Nov 30 2017 *)
%t A001690 Table[Floor[n +Log[GoldenRatio, Sqrt[5]*(Log[GoldenRatio, Sqrt[5]*n] +n) -5 +3/n] -2], {n, 2, 100}] (* _G. C. Greubel_, May 26 2019 *)
%o A001690 (PARI) lgg(x)=log(x)/log((sqrt(5)+1)/2);
%o A001690 a(n)=n++;floor(n+lgg(sqrt(5)*(lgg(sqrt(5)*n)+n)-5+3/n)-2);
%o A001690 vector(66,n,a(n)) /* _Joerg Arndt_, May 14 2011 */
%o A001690 (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 (Haskell)
%o A001690 a001690 n = a001690_list !! (n-1)
%o A001690 a001690_list = filter ((== 0) . a010056) [0..]
%o A001690 -- _Reinhard Zumkeller_, Oct 10 2013
%o A001690 (Python)
%o A001690 def f(n):
%o A001690     a=1
%o A001690     b=2
%o A001690     c=3
%o A001690     while n>0:
%o A001690         a=b
%o A001690         b=c
%o A001690         c=a+b
%o A001690         n-=(c-b-1)
%o A001690     n+=(c-b-1)
%o A001690     return (b+n)
%o A001690 for i in range(1,1001):
%o A001690     print(str(i)+" "+str(f(i))) # _Indranil Ghosh_, Dec 22 2016
%o A001690 (Magma) phi:= (1+Sqrt(5))/2; [Floor(n + Log(phi, Sqrt(5)*(Log(phi, Sqrt(5)*n) + n) - 5 + 3/n) - 2 ): n in [2..100]]; // _G. C. Greubel_, May 26 2019
%o A001690 (Sage) [floor( n + log( sqrt(5)*(log(sqrt(5)*n, golden_ratio) + n) - 5 + 3/n , golden_ratio) - 2 ) for n in (2..100)] # _G. C. Greubel_, May 26 2019
%Y A001690 The nonnegative integers that are not in A000045.
%Y A001690 Cf. A010056.
%K A001690 nonn,easy,nice
%O A001690 1,1
%A A001690 _N. J. A. Sloane_