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.

Showing 1-10 of 17 results. Next

A130241 Maximal index k of a Lucas number such that Lucas(k) <= n (the 'lower' Lucas (A000032) Inverse).

Original entry on oeis.org

1, 1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 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, 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
Offset: 1

Views

Author

Hieronymus Fischer, May 19 2007, Jul 02 2007

Keywords

Comments

Inverse of the Lucas sequence (A000032), nearly, since a(Lucas(n))=n for n>=1 (see A130242 and A130247 for other versions). For n>=2, a(n)+1 is equal to the partial sum of the Lucas indicator sequence (see A102460). Identical to A130247 except for n=2.

Examples

			a(10)=4, since Lucas(4)=7<=10 but Lucas(5)=11>10.
		

Crossrefs

For partial sums see A130243. Other related sequences: A000032, A130242, A130245, A130247, A130249, A130255, A130259. Indicator sequence A102460. Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Magma
    [Floor(Log((2*n+1)/2)/Log((1+Sqrt(5))/2)): n in [2..50]]; // G. C. Greubel, Sep 09 2018
    
  • Mathematica
    Join[{1}, Table[Floor[Log[GoldenRatio, n + 1/2]], {n, 2, 50}]] (* G. C. Greubel, Dec 24 2017 *)
  • PARI
    for(n=1,50, print1(floor(log((2*n+1)/2)/log((1+sqrt(5))/2)), ", ")) \\ G. C. Greubel, Sep 09 2018
    
  • Python
    from itertools import count, islice
    def A130241_gen(): # generator of terms
        a, b = 1, 3
        for i in count(1):
            yield from (i,)*(b-a)
            a, b = b, a+b
    A130241_list = list(islice(A130241_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

a(n) = floor(log_phi((n+sqrt(n^2+4))/2)) = floor(arcsinh((n+1)/2)/log(phi)) where phi=(1+sqrt(5))/2.
a(n) = A130242(n+1) - 1 for n>=2.
a(n) = A130247(n) except for n=2.
G.f.: g(x) = 1/(1-x) * Sum{k>=1, x^Lucas(k)}.
a(n) = floor(log_phi(n+1/2)) for n>=2, where phi is the golden ratio.

A130245 Number of Lucas numbers (A000032) <= n.

Original entry on oeis.org

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
Offset: 0

Views

Author

Hieronymus Fischer, May 19 2007, Jul 02 2007

Keywords

Comments

Partial sums of the Lucas indicator sequence A102460.
For n>=2, we have a(A000032(n)) = n + 1.

Examples

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

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.

Programs

  • 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
    
  • Mathematica
    Join[{0}, Table[1+Floor[Log[GoldenRatio, (2*n+1)/2]], {n,1,100}]] (* G. C. Greubel, Sep 09 2018 *)
  • 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
    
  • 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

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.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3/2 - Pi/(6*sqrt(3)) - log(3)/2. - Amiram Eldar, Jul 25 2025

A130242 Minimal index k of a Lucas number such that Lucas(k)>=n (the 'upper' Lucas (A000032) Inverse).

Original entry on oeis.org

0, 0, 0, 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
Offset: 0

Views

Author

Hieronymus Fischer, May 19 2007, Jul 02 2007

Keywords

Comments

Inverse of the Lucas sequence (A000032), nearly, since a(Lucas(n))=n except for n=1 (see A130241 and A130247 for other versions). For n>=2, a(n+1) is equal to the partial sum of the Lucas indicator sequence (see A102460).

Examples

			a(10)=5, since Lucas(5)=11>=10 but Lucas(4)=7<10.
		

Crossrefs

For partial sums see A130244.
Other related sequences: A000032, A130241, A130245, A130247, A130250, A130256, A130260.
Indicator sequence A102460.
Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Mathematica
    Join[{0, 0, 0}, Table[Ceiling[Log[GoldenRatio, n + 1/2]], {n, 2, 50}]] (* G. C. Greubel, Dec 24 2017 *)
  • Python
    from itertools import islice, count
    def A130242_gen(): # generator of terms
        yield from (0,0,0,2)
        a, b = 3, 4
        for i in count(3):
            yield from (i,)*(b-a)
            a, b = b, a+b
    A130242_list = list(islice(A130242_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

a(n) = ceiling(log_phi((n+sqrt(n^2-4))/2))=ceiling(arccosh(n/2)/log(phi)) where phi=(1+sqrt(5))/2.
a(n) = A130241(n-1) + 1 = A130245(n-1) for n>=3.
G.f.: x/(1-x)*(2x^2+sum{k>=2, x^Lucas(k)}).
a(n) = ceiling(log_phi(n-1/2)) for n>=3, where phi is the golden ratio.

A304092 Number of Lucas numbers (A000032: 2, 1, 3, 4, 7, 11, ...) dividing n.

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 2, 3, 2, 2, 2, 4, 1, 3, 2, 3, 1, 4, 1, 3, 3, 3, 1, 4, 1, 2, 2, 4, 2, 3, 1, 3, 3, 2, 2, 5, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 2, 4, 2, 2, 2, 3, 1, 4, 2, 4, 2, 3, 1, 4, 1, 2, 3, 3, 1, 4, 1, 3, 2, 3, 1, 5, 1, 2, 2, 4, 3, 3, 1, 3, 2, 2, 1, 5, 1, 2, 3, 4, 1, 4, 2, 3, 2, 3, 1, 4, 1, 3, 3, 3, 1, 3, 1, 3, 3
Offset: 1

Views

Author

Antti Karttunen, May 13 2018

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A102460(d).
a(n) = A304091(n) + A102460(n).
a(n) = A304094(n) + A059841(n) = A304096(n) + A059841(n) + A079978(n) + 1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A093540 + 1/2 = 2.462858... . - Amiram Eldar, Dec 31 2023

A304333 Number of positive integers k such that n - L(k) is a positive squarefree number, where L(k) denotes the k-th Lucas number A000204(k).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 2, 3, 3, 3, 2, 3, 3, 5, 2, 3, 4, 5, 2, 4, 4, 4, 3, 5, 4, 4, 2, 3, 3, 5, 3, 5, 5, 5, 4, 4, 5, 4, 4, 6, 5, 6, 3, 6, 4, 5, 3, 6, 5, 6, 3, 5, 4, 5, 3, 3, 4, 6, 4, 6, 4, 7, 3, 6, 4, 6, 2, 6, 6, 6, 4, 5, 6, 4, 4, 6, 7, 6, 3, 7, 6, 6, 4, 6, 5, 7, 5, 6, 7, 8
Offset: 1

Views

Author

Zhi-Wei Sun, May 11 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for n up to 5*10^9.
See also A304331 for a similar conjecture involving Fibonacci numbers.
For all n, a(n) <= A130241(n). - Antti Karttunen, May 13 2018

Examples

			a(2) = 1 with 2 - L(1) = 1 squarefree.
a(3) = 1 with 3 - L(1) = 2 squarefree.
a(67) = 2 with 67 - L(1) = 2*3*11 and 67 - L(7) = 2*19 both squarefree.
		

Crossrefs

Programs

  • Maple
    a := proc(n) local count, lucas, newcas;
    count := 0; lucas := 1; newcas := 2;
    while lucas < n do
        if numtheory:-issqrfree(n - lucas) then count := count + 1 fi;
        lucas, newcas := lucas + newcas, lucas;
    od;
    count end:
    seq(a(n), n=1..90); # Peter Luschny, May 15 2018
  • Mathematica
    f[n_]:=f[n]=LucasL[n];
    tab={};Do[r=0;k=1;Label[bb];If[f[k]>=n,Goto[aa]];If[SquareFreeQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]
  • PARI
    A304333(n) = { my(u1=1,u2=3,old_u1,c=0); if(n<=2,n-1,while(u1Antti Karttunen, May 13 2018

A132664 a(1)=1, a(2)=2, a(n) = a(n-1) + n if the minimal positive integer not yet in the sequence is greater than a(n-1), else a(n) = a(n-1) - 1.

Original entry on oeis.org

1, 2, 5, 4, 3, 9, 8, 7, 6, 16, 15, 14, 13, 12, 11, 10, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48
Offset: 1

Views

Author

Hieronymus Fischer, Sep 15 2007

Keywords

Comments

Also: a(1)=1, a(2)=2, a(n) = maximal positive number < a(n-1) not yet in the sequence, if it exists, else a(n) = a(n-1) + n.
Also: a(1)=1, a(2)=2, a(n) = a(n-1) - 1, if a(n-1) - 1 > 0 and has not been encountered so far, else a(n) = a(n-1) + n.
A permutation of the positive integers. The sequence is self-inverse, in that a(a(n)) = n.

Crossrefs

For an analog concerning Fibonacci numbers see A132665.
See A132666-A132674 for sequences with a similar recurrence rule.

Formula

G.f.: g(x) = (L'(x) - x^2 - 1/(1-x))/(1-x) where L(x) = Sum_{k>=0} x^Lucas(k) and Lucas(k) = A000032(k). L(x) is the g.f. of the Lucas indicator sequence (see A102460) and L'(x) = derivative of L(x).
a(n) = Lucas(Lucas_inverse(n+1)+2) - n - 3 = A000032(A130241(n+1) + 2) - n - 3 for n > 1.
a(n) = A000032(floor(log_phi(n + 3/2)) + 2) - n - 3 for n > 1, where phi = (1 + sqrt(5))/2 is the golden ratio.

A130247 Inverse Lucas (A000032) numbers: index k of a Lucas number such that Lucas(k)=n; max(k|Lucas(k) < n), if there is no such index.

Original entry on oeis.org

1, 0, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 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, 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
Offset: 1

Views

Author

Hieronymus Fischer, May 19 2007, Jul 02 2007

Keywords

Comments

Inverse of the Lucas sequence (A000032), since a(Lucas(n))=n for n >= 0 (see A130241 and A130242 for other versions). Same as A130241 except for n=1.

Examples

			a(2)=0, since Lucas(0)=2; a(10)=4, since Lucas(4) = 7 < 10 but Lucas(5) = 11 > 10.
		

Crossrefs

For partial sums see A130248. Other related sequences: A000032, A130241, A130242, A130245, A130249, A130255, A130259. Indicator sequence A102460. For Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Mathematica
    Join[{1, 0}, Table[Floor[Log[GoldenRatio, n + 1/2]], {n, 3, 50}]] (* G. C. Greubel, Dec 21 2017 *)
  • Python
    from itertools import islice, count
    def A130247_gen(): # generator of terms
        yield from (1,0)
        a, b = 3, 4
        for i in count(2):
            yield from (i,)*(b-a)
            a, b = b, a+b
    A130247_list = list(islice(A130247_gen(),40)) # Chai Wah Wu, Jun 08 2022

Formula

a(n)=c(n), if (n^2-4)/5 is a square number, a(n)=s(n), if (n^2+4)/5 is a square number and a(n)=floor(log_phi(n)) otherwise, where s(n)=floor(arcsinh(n/2)/log(phi)), c(n)=floor(arccosh(n/2)/log(phi)) and phi=(1+sqrt(5))/2.
a(n) = A130241(n) except for n=2.
G.f.: g(x) = (1/(1-x))*(Sum_{k>=1} x^Lucas(k)) - x^2.
a(n) = floor(log_phi(n+1/2)) for n >= 3, where phi is the golden ratio.

A304096 Number of Lucas numbers larger than 3 (4, 7, 11, 18, ...) that divide n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 2, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 2, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 2, 0, 0, 1, 1
Offset: 1

Views

Author

Antti Karttunen, May 13 2018

Keywords

Comments

a(n) is the number of the divisors d of n that are of the form d = A000045(k-1) + A000045(k+1), for k >= 3.

Examples

			The divisors of 4 are 1, 2 and 4. Of these only 4 is a Lucas number larger than 3, thus a(4) = 1.
The divisors of 28 are 1, 2, 4, 7, 14 and 28. Of these 4 and 7 are Lucas numbers (A000032) larger than 3, thus a(28) = 2.
		

Crossrefs

Programs

  • 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)); };
    A304096(n) = sumdiv(n,d,(d>3)*A102460(d));

Formula

a(n) = Sum_{d|n, d>3} A102460(d).
a(n) = A304094(n) - A079978(n) - 1.
a(n) = A304092(n) - A059841(n) - A079978(n) - 1.
a(n) = A007949(A304104(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A093540 - 4/3 = 0.629524... . - Amiram Eldar, Dec 31 2023

A304095 a(n) is the number of the proper divisors of n that are Lucas numbers larger than 3 (4, 7, 11, 18, ...).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 2, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 2, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 2, 0, 0, 0, 2, 0, 0, 1, 1
Offset: 1

Views

Author

Antti Karttunen, May 13 2018

Keywords

Comments

a(n) is the number of the proper divisors d of n that are of the form d = A000045(k-1) + A000045(k+1), for k >= 3.

Examples

			The proper divisors of 28 are 1, 2, 4, 7 and 14. Of these 4 and 7 are Lucas numbers (A000032) larger than 3, thus a(28) = 2.
		

Crossrefs

Programs

  • 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)); };
    A304095(n) = sumdiv(n,d,(d>3)*(dA102460(d));

Formula

a(n) = Sum_{d|n, d>3, dA102460(d).
a(n) = A007949(A304102(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A093540 - 4/3 = 0.629524... . - Amiram Eldar, Jul 05 2025

A304091 a(n) is the number of the proper divisors of n that are Lucas numbers (A000032, with 2 included).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 3, 2, 2, 1, 4, 1, 3, 2, 3, 1, 3, 1, 3, 3, 3, 1, 4, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 2, 5, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 4, 2, 2, 2, 3, 1, 4, 2, 4, 2, 3, 1, 4, 1, 2, 3, 3, 1, 4, 1, 3, 2, 3, 1, 5, 1, 2, 2, 3, 3, 3, 1, 3, 2, 2, 1, 5, 1, 2, 3, 4, 1, 4, 2, 3, 2, 3, 1, 4, 1, 3, 3, 3, 1, 3, 1, 3, 3
Offset: 1

Views

Author

Antti Karttunen, May 13 2018

Keywords

Crossrefs

Programs

  • 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)); };
    A304091(n) = sumdiv(n,d,(dA102460(d));

Formula

a(n) = Sum_{d|n, dA102460(d).
a(n) = A304092(n) - A102460(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/2 + A093540 = 2.462858... . - Amiram Eldar, Jul 05 2025
Showing 1-10 of 17 results. Next