[go: up one dir, main page]

login
Search: a130247 -id:a130247
     Sort: relevance | references | number | modified | created      Format: long | short | data
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
OFFSET
1,3
LINKS
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).
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.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 19 2007
STATUS
approved
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
OFFSET
1,3
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.
LINKS
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.
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
A130241_list = list(islice(A130241_gen(), 40)) # Chai Wah Wu, Jun 08 2022
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.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 19 2007, Jul 02 2007
STATUS
approved
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
OFFSET
0,1
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)
LINKS
Casey Mongoven, Lucas Binary no. 1; electronic music created with this sequence.
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)
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
CROSSREFS
Cf. partial sums A130245.
KEYWORD
nonn
AUTHOR
Casey Mongoven, Apr 18 2005
EXTENSIONS
Data section extended up to a(123) by Antti Karttunen, Nov 22 2017
STATUS
approved
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
OFFSET
0,3
COMMENTS
Partial sums of the Lucas indicator sequence A102460.
For n>=2, we have a(A000032(n)) = n + 1.
LINKS
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.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 19 2007, Jul 02 2007
STATUS
approved
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
OFFSET
0,4
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).
LINKS
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.
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
A130242_list = list(islice(A130242_gen(), 40)) # Chai Wah Wu, Jun 08 2022
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.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 19 2007, Jul 02 2007
STATUS
approved

Search completed in 0.030 seconds