# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a130245
Showing 1-1 of 1
%I A130245 #29 Sep 08 2022 08:45:30
%S A130245 0,1,2,3,4,4,4,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,
%T A130245 8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
%U A130245 9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10
%N A130245 Number of Lucas numbers (A000032) <= n.
%C A130245 Partial sums of the Lucas indicator sequence A102460.
%C A130245 For n>=2, we have a(A000032(n)) = n + 1.
%H A130245 Antti Karttunen, Table of n, a(n) for n = 0..64079
%H A130245 Dorin Andrica, Ovidiu Bagdasar, and George Cătălin Tųrcąs, On some new results for the generalised Lucas sequences, An. Şt. Univ. Ovidius Constanţa (Romania, 2021) Vol. 29, No. 1, 17-36.
%F A130245 a(n) = 1 +floor(log_phi((n+sqrt(n^2+4))/2)) = 1 +floor(arcsinh(n/2)/log(phi)) for n>=2, where phi = (1+sqrt(5))/2.
%F A130245 a(n) = A130241(n)+1 = A130242(n+1) for n>=2.
%F A130245 G.f.: g(x) = 1/(1-x)*sum{k>=0, x^Lucas(k)}.
%F A130245 a(n) = 1 +floor(log_phi(n+1/2)) for n>=1, where phi is the golden ratio.
%e A130245 a(9)=5 because there are 5 Lucas numbers <=9 (2,1,3,4 and 7).
%t A130245 Join[{0}, Table[1+Floor[Log[GoldenRatio, (2*n+1)/2]], {n,1,100}]] (* _G. C. Greubel_, Sep 09 2018 *)
%o A130245 (PARI)
%o A130245 A102460(n) = { my(u1=1,u2=3,old_u1); if(n<=2,sign(n),while(n>u2,old_u1=u1;u1=u2;u2=old_u1+u2);(u2==n)); };
%o A130245 A130245(n) = if(!n,n,A102460(n)+A130245(n-1));
%o A130245 \\ Or just as:
%o A130245 c=0; for(n=0,123,c += A102460(n); print1(c,", ")); \\ _Antti Karttunen_, May 13 2018
%o A130245 (Magma) [0] cat [1+Floor(Log((2*n+1)/2)/Log((1+Sqrt(5))/2)): n in [1..100]]; // _G. C. Greubel_, Sep 09 2018
%o A130245 (Python)
%o A130245 from itertools import count, islice
%o A130245 def A130245_gen(): # generator of terms
%o A130245 yield from (0, 1, 2)
%o A130245 a, b = 3,4
%o A130245 for i in count(3):
%o A130245 yield from (i,)*(b-a)
%o A130245 a, b = b, a+b
%o A130245 A130245_list = list(islice(A130245_gen(),40)) # _Chai Wah Wu_, Jun 08 2022
%Y A130245 Partial sums of A102460.
%Y A130245 For partial sums of this sequence, see A130246. Other related sequences: A000032, A130241, A130242, A130247, A130249, A130253, A130255, A130259.
%Y A130245 For Fibonacci inverse, see A130233 - A130240, A104162, A108852.
%K A130245 nonn
%O A130245 0,3
%A A130245 _Hieronymus Fischer_, May 19 2007, Jul 02 2007
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE