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 15 results. Next

A130246 Partial sums of A130245.

Original entry on oeis.org

0, 1, 3, 6, 10, 14, 18, 23, 28, 33, 38, 44, 50, 56, 62, 68, 74, 80, 87, 94, 101, 108, 115, 122, 129, 136, 143, 150, 157, 165, 173, 181, 189, 197, 205, 213, 221, 229, 237, 245, 253, 261, 269, 277, 285, 293, 301, 310, 319, 328, 337, 346, 355, 364, 373, 382, 391
Offset: 0

Views

Author

Hieronymus Fischer, May 19 2007

Keywords

Crossrefs

Other related sequences: A000032, A130241, A130243, A130244, A130248, A130251, A130252, A130255, A130257, A130261. Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Magma
    [0] cat [(&+[1+Floor(Log((2*k+1)/2)/Log((1+Sqrt(5))/2)): k in [1..n]]): n in [1..100]]; // G. C. Greubel, Sep 09 2018
  • Mathematica
    Table[Sum[1 + Floor[Log[GoldenRatio, (2*k + 1)/2]], {k, 1, n}], {n, 0, 100}] (* G. C. Greubel, Sep 09 2018 *)
  • PARI
    for(n=0, 100, print1(sum(k=1,n, 1 + floor(log((2*k+1)/2)/log((1+sqrt(5))/2))), ", ")) \\ G. C. Greubel, Sep 09 2018
    

Formula

a(n) = Sum_{k=1..n} A130245(k).
a(n) = 1 +(n+1)*A130245(n) - A000032(A130245(n)+1) for n=0 or n >= 2.
G.f.: 1/(1-x)^2*Sum_{k>=0} x^A000032(k).

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.

A130248 Partial sums of the Lucas Inverse A130247.

Original entry on oeis.org

1, 1, 3, 6, 9, 12, 16, 20, 24, 28, 33, 38, 43, 48, 53, 58, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 136, 143, 150, 157, 164, 171, 178, 185, 192, 199, 206, 213, 220, 227, 234, 241, 248, 255, 263, 271, 279, 287, 295, 303, 311, 319, 327, 335, 343, 351
Offset: 1

Views

Author

Hieronymus Fischer, May 19 2007

Keywords

Crossrefs

Other related sequences: A000032, A130241, A130242, A130243, A130244, A130245, A130246, A130251, A130252, A130257, A130261. Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Mathematica
    Join[{1, 1}, Table[Sum[Floor[Log[GoldenRatio, k + 1/2]], {k, 1, n}], {n, 3, 50}]] (* G. C. Greubel, Dec 24 2017 *)

Formula

a(n)=sum{1<=k<=n, A130247(k)}=2+(n+1)*A130247(n)-A000032(A130247(n)+2) for n>=3. G.f.: g(x)=1/(1-x)^2*(sum{k>=1, x^Lucas(k)}-x^2).

A102460 a(n) = 1 if n is a Lucas number, else a(n) = 0.

Original entry on oeis.org

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

Views

Author

Casey Mongoven, Apr 18 2005

Keywords

Comments

From Hieronymus Fischer, Jul 02 2007: (Start)
a(n) is the number of nonnegative integer solutions to 25*x^4-10*n^2*x^2+n^4-16=0.
a(n)=1 if and only if there is an integer m such that x=n is a root of p(x)=x^4-10*m^2*x^2+25*m^4-16.
For n>=3: a(n)=1 iff floor(log_phi(n+1/2))=ceiling(log_phi(n-1/2)). (End)

Crossrefs

Programs

  • Mathematica
    {0}~Join~ReplacePart[ConstantArray[0, Last@ #], Map[# -> 1 &, #]] &@ Array[LucasL, 11, 0] (* Michael De Vlieger, Nov 22 2017 *)
    With[{nn=130,lc=LucasL[Range[0,20]]},Table[If[MemberQ[lc,n],1,0],{n,0,nn}]] (* Harvey P. Dale, Jul 03 2022 *)
  • PARI
    a(n)=my(f=factor(25*'x^4-10*n^2*'x^2+n^4-16)[,1]); sum(i=1,#f, poldegree(f[i])==1 && polcoeff(f[i],0)<=0) \\ Charles R Greathouse IV, Nov 06 2014
    
  • 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)); }; \\ Antti Karttunen, Nov 22 2017
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A102460(n): return int(is_square(m:=5*(n**2-4)) or is_square(m+40)) # Chai Wah Wu, Jun 13 2024

Formula

From Hieronymus Fischer, Jul 02 2007: (Start)
G.f.: g(x) = Sum_{k>=0} x^A000032(k).
a(n) = 1+floor(arcsinh(n/2)/log(phi))-ceiling(arccosh(n/2)/log(phi)) for n>=3, where phi=(1+sqrt(5))/2.
a(n) = 1+A130241(n)-A130242(n) for n>=3.
a(n) = 1+A130247(n)-A130242(n) for n=>2.
a(n) = A130245(n)-A130245(n-1) for n>=1.
For n>=3: a(n)=1 iff A130241(n)=A130242(n). (End)

Extensions

Data section extended up to a(123) by Antti Karttunen, Nov 22 2017

A130253 Number of Jacobsthal numbers (A001045) <=n.

Original entry on oeis.org

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

Views

Author

Hieronymus Fischer, May 20 2007

Keywords

Comments

Partial sums of the Jacobsthal indicator sequence (A105348).
For n<>1, we have a(A001045(n))=n+1.

Examples

			a(9)=5 because there are 5 Jacobsthal numbers <=9 (0,1,1,3 and 5).
		

Crossrefs

For partial sums see A130252. Other related sequences A001045, A130249, A130250, A130253, A105348. Also A130233, A130235, A130241, A108852, A130245.

Programs

Formula

a(n) = floor(log_2(3n+1)) + 1 = ceiling(log_2(3n+2)).
a(n) = A130249(n) + 1 = A130250(n+1).
G.f.: 1/(1-x)*(Sum_{k>=0} x^A001045(k)).

A130243 Partial sums of the 'lower' Lucas Inverse A130241.

Original entry on oeis.org

1, 2, 4, 7, 10, 13, 17, 21, 25, 29, 34, 39, 44, 49, 54, 59, 64, 70, 76, 82, 88, 94, 100, 106, 112, 118, 124, 130, 137, 144, 151, 158, 165, 172, 179, 186, 193, 200, 207, 214, 221, 228, 235, 242, 249, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352
Offset: 1

Views

Author

Hieronymus Fischer, May 19 2007

Keywords

Crossrefs

Other related sequences: A000032, A130244, A130242, A130245, A130246, A130248, A130251, A130257, A130261. Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Magma
    [1 + (&+[Floor(Log(k+1/2)/Log((1+Sqrt(5))/2)): k in [1..n]]): n in [1..50]]; // G. C. Greubel, Sep 13 2018
  • Mathematica
    Table[1 + Sum[Floor[Log[GoldenRatio, k + 1/2]], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Sep 13 2018 *)
  • PARI
    for(n=1,50, print1(1 + sum(k=1,n,floor(log(k+1/2)/log((1+sqrt(5))/2))), ", ")) \\ G. C. Greubel, Sep 13 2018
    

Formula

a(n) = Sum_{k=1..n} A130241(k).
a(n) = (n+1)*A130241(n) - A000032(A130241(n)+2) + 3.
G.f.: g(x) = 1/(1-x)^2*Sum_{k>=1} x^Lucas(k).

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.

A130244 Partial sums of the 'upper' Lucas Inverse A130242.

Original entry on oeis.org

0, 0, 0, 2, 5, 9, 13, 17, 22, 27, 32, 37, 43, 49, 55, 61, 67, 73, 79, 86, 93, 100, 107, 114, 121, 128, 135, 142, 149, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 309, 318, 327, 336, 345, 354, 363, 372, 381, 390
Offset: 0

Views

Author

Hieronymus Fischer, May 19 2007

Keywords

Crossrefs

Other related sequences: A000032, A130241, A130243, A130245, A130246, A130248, A130252, A130258, A130262. Fibonacci inverse see A130233 - A130240, A104162.

Programs

  • Magma
    [0,0] cat [(&+[Ceiling(Log(k + 1/2)/Log((1+Sqrt(5))/2)) : k in [0..n]]): n in [1..50]]; // G. C. Greubel, Sep 12 2018
  • Mathematica
    Join[{0, 0}, Table[Sum[Ceiling[Log[GoldenRatio, k + 1/2]], {k, 0, n}], {n, 1, 50}]] (* G. C. Greubel, Sep 12 2018 *)
  • PARI
    for(n=-1,50, print1(if(n==-1, 0, if(n==0, 0, sum(k=0, n, ceil(log(k + 1/2)/log((1+sqrt(5))/2))))), ", ")) \\ G. C. Greubel, Sep 12 2018
    

Formula

a(n) = Sum_{k=0..n} A130242(k).
a(n) = n*A130242(n) - A000032(A130242(n) +1) for n>=3.
G.f.: x/(1-x)^2*(2*x^2 + Sum{k>=2, x^Lucas(k)}).

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.

A335741 Number of Pell numbers (A000129) <= n.

Original entry on oeis.org

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

Views

Author

Ovidiu Bagdasar, Jun 20 2020

Keywords

Comments

The sequence is constant on the interval A000129(k) < n <= A000129(k+1).

Examples

			The Pell numbers A000129 are 0,1,2,5,12,29,70,...
We have a(2)=a(3)=a(4)=3, since there are three Pell numbers less than or equal to 2,3 and 4, respectively.
		

Crossrefs

Cf. A000129 (Pell Numbers), A108852 (Fibonacci), A130245 (Lucas), A130253 (Jacobsthal).
Partial sums of A105349.

Programs

Formula

a(n) = 1+floor(log_alpha(2*sqrt(2)*n+1)), n>=0, where alpha=1+sqrt(2).
Showing 1-10 of 15 results. Next