Displaying 1-5 of 5 results found.
page
1
Partial sums of the Lucas Inverse A130247.
+20
20
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
MATHEMATICA
Join[{1, 1}, Table[Sum[Floor[Log[GoldenRatio, k + 1/2]], {k, 1, n}], {n, 3, 50}]] (* G. C. Greubel, Dec 24 2017 *)
CROSSREFS
Other related sequences: A000032, A130241, A130242, A130243, A130244, A130245, A130246, A130251, A130252, A130257, A130261. Fibonacci inverse see A130233 - A130240, A104162.
Maximal index k of a Lucas number such that Lucas(k) <= n (the 'lower' Lucas ( A000032) Inverse).
+10
25
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
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.
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.
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.
EXAMPLE
a(10)=4, since Lucas(4)=7<=10 but Lucas(5)=11>10.
MATHEMATICA
Join[{1}, Table[Floor[Log[GoldenRatio, n + 1/2]], {n, 2, 50}]] (* G. C. Greubel, Dec 24 2017 *)
PROG
(PARI) for(n=1, 50, print1(floor(log((2*n+1)/2)/log((1+sqrt(5))/2)), ", ")) \\ G. C. Greubel, Sep 09 2018
(Magma) [Floor(Log((2*n+1)/2)/Log((1+Sqrt(5))/2)): n in [2..50]]; // 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
a(n) = 1 if n is a Lucas number, else a(n) = 0.
+10
18
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
COMMENTS
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)
FORMULA
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.
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 *)
PROG
(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
Number of Lucas numbers ( A000032) <= n.
+10
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
COMMENTS
Partial sums of the Lucas indicator sequence A102460.
For n>=2, we have a( A000032(n)) = n + 1.
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.
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)); };
\\ Or just as:
(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
Minimal index k of a Lucas number such that Lucas(k)>=n (the 'upper' Lucas ( A000032) Inverse).
+10
10
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
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).
FORMULA
a(n) = ceiling(log_phi((n+sqrt(n^2-4))/2))=ceiling(arccosh(n/2)/log(phi)) where phi=(1+sqrt(5))/2.
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.
EXAMPLE
a(10)=5, since Lucas(5)=11>=10 but Lucas(4)=7<10.
MATHEMATICA
Join[{0, 0, 0}, Table[Ceiling[Log[GoldenRatio, n + 1/2]], {n, 2, 50}]] (* G. C. Greubel, Dec 24 2017 *)
PROG
(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
Search completed in 0.030 seconds
|