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!)
A057854 Non-Lucas numbers: the complement of A000032. 7

%I #30 Jun 21 2019 22:50:45

%S 5,6,8,9,10,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,30,31,32,

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

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

%N Non-Lucas numbers: the complement of A000032.

%C The formula is a consequence of the Lambek-Moser theorem.

%H G. C. Greubel, <a href="/A057854/b057854.txt">Table of n, a(n) for n = 1..10000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lambek%E2%80%93Moser_theorem">Lambek-Moser theorem</a>

%F a(n) = floor(1/2 - LambertW(-1, -log(phi)/phi^(n+1/2))/log(phi)) with phi = (1+sqrt(5))/2. - Nicolas Normand (nicolas.normand (at) polytech.univ-nantes.fr)

%F a(n) = A090946(n+2). - _R. J. Mathar_, Jan 29 2019

%p a := proc(n) floor(-1/ln(1/2+1/2*5^(1/2))*LambertW(-1,-ln(1/2+1/2*5^(1/2))/ ((1/2+1/2*5^(1/2))^(n+1/2)))+1/2) end; # _Simon Plouffe_, Nov 30 2017

%p # alternative

%p isA000032 := proc(n)

%p local l1,l2 ;

%p if n <= 0 then

%p false;

%p elif n <= 4 then

%p true ;

%p else

%p l1 := 3 ; l2 := 4 ;

%p while true do

%p l := l1+l2 ;

%p if l > n then

%p return false;

%p elif l = n then

%p return true;

%p else

%p l1 := l2 ; l2 := l ;

%p end if;

%p end do:

%p end if;

%p end proc:

%p isA057854 := proc(n)

%p not isA000032(n) ;

%p end proc:

%p A057854 := proc(n)

%p option remember;

%p if n = 1 then

%p 5 ;

%p else

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

%p if isA057854(a) then

%p return a;

%p end if;

%p end do:

%p end if;

%p end proc:

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

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

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

%t b:= Complement[Range[1, 100], LucasL[Range[20]]]; Table[b[[n+1]], {n, 1, 70}] (* _G. C. Greubel_, Jun 19 2019 *)

%K nonn,easy

%O 1,1

%A _Roger Cuculière_, Nov 12 2000

%E More terms from Larry Reeves (larryr(AT)acm.org), Nov 28 2000

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 April 25 05:55 EDT 2024. Contains 371964 sequences. (Running on oeis4.)