[go: up one dir, main page]

login
Search: a130241 -id:a130241
     Sort: relevance | references | number | modified | created      Format: long | short | data
Partial sums of the 'lower' Lucas Inverse A130241.
+20
11
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,2
LINKS
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).
MATHEMATICA
Table[1 + Sum[Floor[Log[GoldenRatio, k + 1/2]], {k, 1, n}], {n, 1, 50}] (* G. C. Greubel, Sep 13 2018 *)
PROG
(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
(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
CROSSREFS
Other related sequences: A000032, A130244, A130242, A130245, A130246, A130248, A130251, A130257, A130261. Fibonacci inverse see A130233 - A130240, A104162.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 19 2007
STATUS
approved
a(n) is the maximal k such that Fibonacci(k) <= n (the "lower" Fibonacci Inverse).
+10
40
0, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 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, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
OFFSET
0,2
COMMENTS
Inverse of the Fibonacci sequence (A000045), nearly, since a(Fibonacci(n)) = n except for n = 1 (see A130234 for another version). a(n) + 1 is equal to the partial sum of the Fibonacci indicator sequence (see A104162).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = floor(log_phi((sqrt(5)*n + sqrt(5*n^2+4))/2)) where phi = (1+sqrt(5))/2 = A001622.
a(n) = floor(arcsinh(sqrt(5)*n/2) / log(phi)), with log(phi) = A002390.
a(n) = A130234(n+1) - 1.
G.f.: g(x) = 1/(1-x) * Sum_{k>=1} x^Fibonacci(k).
a(n) = floor(log_phi(sqrt(5)*n+1)), n >= 0, where phi is the golden ratio. - Hieronymus Fischer, Jul 02 2007
EXAMPLE
a(10) = 6, since Fibonacci(6) = 8 <= 10 but Fibonacci(7) = 13 > 10.
MATHEMATICA
fibLLog[0] := 0; fibLLog[1] := 2; fibLLog[n_Integer] := fibLLog[n] = If[n < Fibonacci[fibLLog[n - 1] + 1], fibLLog[n - 1], fibLLog[n - 1] + 1]; Table[fibLLog[n], {n, 0, 88}] (* Alonso del Arte, Sep 01 2013 *)
PROG
(PARI) a(n)=log(sqrt(5)*n+1.5)\log((1+sqrt(5))/2) \\ Charles R Greathouse IV, Mar 21 2012
CROSSREFS
Cf. A130235 (partial sums), A104162 (first differences).
Other related sequences: A000045, A130234, A130237, A130239, A130255, A130259, A108852. Lucas inverse: A130241.
Cf. A001622 (golden ratio), A002390 (its log).
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 17 2007
STATUS
approved
Minimal index k of a Fibonacci number such that Fibonacci(k) >= n (the 'upper' Fibonacci Inverse).
+10
23
0, 1, 3, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 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, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
OFFSET
0,3
COMMENTS
Inverse of the Fibonacci sequence (A000045), nearly, since a(Fibonacci(n)) = n except for n = 2 (see A130233 for another version). a(n+1) is equal to the partial sum of the Fibonacci indicator sequence (see A104162).
FORMULA
a(n) = ceiling(log_phi((sqrt(5)*n + sqrt(5*n^2-4))/2)) = ceiling(arccosh(sqrt(5)*n/2)/log(phi)) where phi = (1+sqrt(5))/2, the golden ratio, for n > 0.
a(n) = A130233(n-1) + 1 for n > 0.
G.f.: x/(1-x) * Sum_{k >= 0} x^Fibonacci(k).
a(n) = ceiling(log_phi(sqrt(5)*n - 1)) for n > 0, where phi is the golden ratio. - Hieronymus Fischer, Jul 02 2007
a(n) = A108852(n-1). - R. J. Mathar, Jan 31 2015
EXAMPLE
a(10) = 7, since Fibonacci(7) = 13 >= 10 but Fibonacci(6) = 8 < 10.
MAPLE
A130234 := proc(n)
local i;
for i from 0 do
if A000045(i) >= n then
return i;
end if;
end do:
end proc: # R. J. Mathar, Jan 31 2015
MATHEMATICA
a[n_] := For[i = 0, True, i++, If[Fibonacci[i] >= n, Return[i]]];
a /@ Range[0, 80] (* Jean-François Alcover, Apr 13 2020 *)
PROG
(PARI) a(n)=my(k); while(fibonacci(k)<n, k++); k \\ Charles R Greathouse IV, Feb 03 2014, corrected by M. F. Hasler, Apr 07 2021
CROSSREFS
Partial sums: A130236.
Other related sequences: A000045, A130233, A130256, A130260, A104162, A108852.
Lucas inverse: A130241 - A130248.
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 17 2007
STATUS
approved
Partial sums of the Lucas Inverse A130247.
+10
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 Jacobsthal number such that A001045(k)<=n (the 'lower' Jacobsthal inverse).
+10
19
0, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 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
OFFSET
0,2
COMMENTS
Inverse of the Jacobsthal sequence (A001045), nearly, since a(A001045(n))=n except for n=1 (see A130250 for another version). a(n)+1 is equal to the partial sum of the Jacobsthal indicator sequence (see A105348).
LINKS
FORMULA
a(n) = floor(log_2(3n+1)).
a(n) = A130250(n+1) - 1 = A130253(n) - 1.
G.f.: 1/(1-x)*(Sum_{k>=1} x^A001045(k)).
a(n) = A000523(3*n+1). - Ruud H.G. van Tol, May 12 2024
EXAMPLE
a(12)=5, since A001045(5)=11<=12, but A001045(6)=21>12.
MATHEMATICA
Table[Floor[Log[2, 3*n + 1]], {n, 0, 50}] (* G. C. Greubel, Jan 08 2018 *)
PROG
(PARI) for(n=0, 30, print1(floor(log(3*n+1)/log(2)), ", ")) \\ G. C. Greubel, Jan 08 2018
(PARI) a(n) = logint(3*n+1, 2); \\ Ruud H.G. van Tol, May 12 2024
(Magma) [Floor(Log(3*n+1)/Log(2)): n in [0..30]]; // G. C. Greubel, Jan 08 2018
(Python)
def A130249(n): return (3*n+1).bit_length()-1 # Chai Wah Wu, Jun 08 2022
CROSSREFS
For partial sums see A130251.
Other related sequences A130250, A130253, A105348, A001045, A130233, A130241.
Cf. A000523, A078008 (runlengths).
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 20 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
Number of Jacobsthal numbers (A001045) <=n.
+10
14
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,2
COMMENTS
Partial sums of the Jacobsthal indicator sequence (A105348).
For n<>1, we have a(A001045(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) = 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)).
EXAMPLE
a(9)=5 because there are 5 Jacobsthal numbers <=9 (0,1,1,3 and 5).
MATHEMATICA
Table[1+Floor[Log[2, 3n+1]], {n, 0, 100}] (* Harvey P. Dale, Jul 03 2013 *)
PROG
(PARI) a(n)=logint(3*n+1, 2)+1 \\ Charles R Greathouse IV, Oct 03 2016
(Magma) [Ceiling(Log(3*n+2)/Log(2)): n in [0..30]]; // G. C. Greubel, Jan 08 2018
CROSSREFS
For partial sums see A130252. Other related sequences A001045, A130249, A130250, A130253, A105348. Also A130233, A130235, A130241, A108852, A130245.
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 20 2007
STATUS
approved
Maximal index k of an odd Fibonacci number (A001519) such that A001519(k) = Fibonacci(2k-1) <= n (the 'lower' odd Fibonacci Inverse).
+10
12
1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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
OFFSET
1,2
COMMENTS
Inverse of the odd Fibonacci sequence (A001519), nearly, since a(A001519(n))=n except for n=0 (see A130256 for another version). a(n)+1 is the number of odd Fibonacci numbers (A001519) <= n (for n >= 1).
LINKS
FORMULA
a(n) = floor((1 + arcsinh(sqrt(5)*n/2)/log(phi))/2).
a(n) = floor((1 + arccosh(sqrt(5)*n/2)/log(phi))/2).
a(n) = floor((1 + log_phi(sqrt(5)*n))/2) for n >= 1, where phi = (1 + sqrt(5))/2.
G.f.: g(x) = 1/(1-x)*Sum_{k>=1} x^Fibonacci(2k-1).
a(n) = floor((1/2)*(1 + log_phi(sqrt(5)*n + 1))) for n >= 1.
EXAMPLE
a(10)=3 because A001519(3) = 5 <= 10, but A001519(4) = 13 > 10.
MATHEMATICA
Table[Floor[(1 +ArcSinh[Sqrt[5]*n/2]/Log[GoldenRatio])/2], {n, 1, 100}] (* G. C. Greubel, Sep 09 2018 *)
PROG
(PARI) phi=(1+sqrt(5))/2; vector(100, n, floor((1 +asinh(sqrt(5)*n/2)/log(phi))/2)) \\ G. C. Greubel, Sep 09 2018
(Magma) phi:=(1+Sqrt(5))/2; [Floor((1 +Argsinh(Sqrt(5)*n/2)/Log(phi))/2): n in [1..100]]; // G. C. Greubel, Sep 09 2018
CROSSREFS
Cf. partial sums A130257. Other related sequences: A000045, A130233, A130237, A130239, A130256, A130259, A104160. Lucas inverse: A130241 - A130248.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 24 2007, Jul 02 2007
STATUS
approved
Partial sums of the 'lower' odd Fibonacci Inverse A130255.
+10
12
1, 3, 5, 7, 10, 13, 16, 19, 22, 25, 28, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250
OFFSET
1,2
LINKS
FORMULA
a(n) = (n+1)*A130255(n) - A001906(A130255(n)).
a(n) = (n+1)*A130255(n) - Fib(2*A130255(n)).
G.f.: g(x)=1/(1-x)^2*sum(k>=1, x^Fib(2k-1)).
MATHEMATICA
Table[Sum[Floor[(1 + ArcSinh[Sqrt[5]*k/2]/Log[GoldenRatio])/2], {k, 1, n}], {n, 1, 100}] (* G. C. Greubel, Sep 09 2018 *)
PROG
(PARI) for(n=1, 100, print1(sum(k=1, n, floor((1+asinh(sqrt(5)*k/2)/log((1+sqrt(5))/2))/2)), ", ")) \\ G. C. Greubel, Sep 09 2018
(Magma) [(&+[Floor((1+Argsinh(Sqrt(5)*k/2)/Log((1+Sqrt(5))/2))/2): k in [1..n]]): n in [1..100]]; // G. C. Greubel, Sep 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 24 2007
STATUS
approved

Search completed in 0.015 seconds