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!)
A130245 Number of Lucas numbers (A000032) <= n. 16
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Partial sums of the Lucas indicator sequence A102460.

For n>=2, we have a(A000032(n)) = n + 1.

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..64079

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.

FORMULA

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.

a(n) = A130241(n)+1 = A130242(n+1) for n>=2.

G.f.: g(x) = 1/(1-x)*sum{k>=0, x^Lucas(k)}.

a(n) = 1 +floor(log_phi(n+1/2)) for n>=1, where phi is the golden ratio.

EXAMPLE

a(9)=5 because there are 5 Lucas numbers <=9 (2,1,3,4 and 7).

MATHEMATICA

Join[{0}, Table[1+Floor[Log[GoldenRatio, (2*n+1)/2]], {n, 1, 100}]] (* G. C. Greubel, Sep 09 2018 *)

PROG

(PARI)

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)); };

A130245(n) = if(!n, n, A102460(n)+A130245(n-1));

\\ Or just as:

c=0; for(n=0, 123, c += A102460(n); print1(c, ", ")); \\ Antti Karttunen, May 13 2018

(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

(Python)

from itertools import count, islice

def A130245_gen(): # generator of terms

    yield from (0, 1, 2)

    a, b = 3, 4

    for i in count(3):

        yield from (i, )*(b-a)

        a, b = b, a+b

A130245_list = list(islice(A130245_gen(), 40)) # Chai Wah Wu, Jun 08 2022

CROSSREFS

Partial sums of A102460.

For partial sums of this sequence, see A130246. Other related sequences: A000032, A130241, A130242, A130247, A130249, A130253, A130255, A130259.

For Fibonacci inverse, see A130233 - A130240, A104162, A108852.

Sequence in context: A325282 A305233 A130242 * A087793 A030411 A194817

Adjacent sequences:  A130242 A130243 A130244 * A130246 A130247 A130248

KEYWORD

nonn

AUTHOR

Hieronymus Fischer, May 19 2007, Jul 02 2007

STATUS

approved

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 June 27 16:04 EDT 2022. Contains 354896 sequences. (Running on oeis4.)