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.

Previous Showing 31-40 of 1497 results. Next

A064723 (L(p)-1)/p where L() are the Lucas numbers (A000032) and p runs through the primes.

Original entry on oeis.org

1, 1, 2, 4, 18, 40, 210, 492, 2786, 39650, 97108, 1459960, 9030450, 22542396, 141358274, 2249412290, 36259245522, 91815545800, 1500020153484, 9702063416738, 24704432285040, 409634464205812, 2672366681180466, 44720842390302450, 1927655270098608960
Offset: 0

Views

Author

Shane Findley, Oct 13 2001

Keywords

Examples

			a(0) = (Lucas(2) - 1)/2 = (3 - 1)/2 = 1; a(3) = (Lucas(7) - 1)/7 = (29 - 1)/7 = 4.
		

Crossrefs

Programs

  • Magma
    [(Lucas(NthPrime(n))-1)/NthPrime(n): n in [1..40]]; // Vincenzo Librandi, Aug 22 2015
  • Maple
    A064723 := proc(n)
        p := ithprime(1+n) ;
        (A000032(p)-1)/p ;
    end proc: # R. J. Mathar, Jan 09 2017
  • Mathematica
    Array[(LucasL@ Prime@ # - 1)/Prime@ # &, {23}] (* Michael De Vlieger, Aug 22 2015 *)
  • PARI
    lucas(n) = if(n==0,2, if(n==1,1,fibonacci(n+1)+fibonacci(n-1)))
    forprime(n=1,100,print1((lucas(n)-1)/n, ", "))
    
  • PARI
    lucas(n)= { if(n==0, 2, if(n==1, 1, fibonacci(n + 1) + fibonacci(n - 1))) }
    { n=-1; forprime (p=2, prime(101), write("b064723.txt", n++, " ", (lucas(p) - 1)/p) ) } \\ Harry J. Smith, Sep 23 2009
    

Formula

a(n) = A006206(A000040(n+1)). - Creighton Dement, Nov 04 2005
a(n) = (round(phi^prime(n+1)) - 1)/prime(n+1), where phi is golden ratio (A001622). Indeed, L(p) = round(phi^p), and round(phi^p) == 1 (mod p) and, what is more, for p>=5, round(phi^p) == 1 (mod 2*p) (see Shevelev link). In particular, all terms >=2 are even. - Vladimir Shevelev, Mar 24 2014

Extensions

More terms from James Sellers and Klaus Brockhaus, Oct 16 2001

A304523 Number of ordered ways to write n as the sum of a Lucas number (A000032) and a positive odd squarefree number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, May 13 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 3, 11, 13, 27, 29, 67, 139, 193, 247, 851.
It has been verified that a(n) > 0 for all n = 2..5*10^9.
See also A304331, A304333 and A304522 for similar conjectures.

Examples

			a(3) = 1 since 3 = A000032(0) + 1 with 1 odd and squarefree.
a(27) = 1 since 27 = A000032(3) + 23 with 23 odd and squarefree.
a(29) = 1 since 29 = A000032(6) + 11 with 11 odd and squarefree.
a(67) = 1 since 67 = A000032(0) + 5*13 with 5*13 odd and squarefree.
a(247) = 1 since 247 = A000032(6) + 229 with 229 odd and squarefree.
a(851) = 1 since 851 = A000032(0) + 3*283 with 3*283 odd and squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=LucasL[n];
    QQ[n_]:=QQ[n]=n>0&&Mod[n,2]==1&&SquareFreeQ[n];
    tab={};Do[r=0;k=0;Label[bb];If[k>0&&f[k]>=n,Goto[aa]];If[QQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,90}];Print[tab]

A005247 a(n) = 3*a(n-2) - a(n-4), a(0)=2, a(1)=1, a(2)=3, a(3)=2. Alternates Lucas (A000032) and Fibonacci (A000045) sequences for even and odd n.

Original entry on oeis.org

2, 1, 3, 2, 7, 5, 18, 13, 47, 34, 123, 89, 322, 233, 843, 610, 2207, 1597, 5778, 4181, 15127, 10946, 39603, 28657, 103682, 75025, 271443, 196418, 710647, 514229, 1860498, 1346269, 4870847, 3524578, 12752043, 9227465, 33385282, 24157817
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a005247 n = a005247_list !! n
    a005247_list = f a000032_list a000045_list where
       f (x::xs) (:y:ys) = x : y : f xs ys
    -- Reinhard Zumkeller, Dec 27 2012
    
  • Magma
    I:=[2,1,3,2]; [n le 4 select I[n] else 3*Self(n-2) - Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 21 2017
  • Maple
    with(combinat): A005247 := n-> if n mod 2 = 1 then fibonacci(n) else fibonacci(n+1)+fibonacci(n-1); fi;
    A005247:=-(z+1)*(3*z**2-z-1)/(z**2-z-1)/(z**2+z-1); # Simon Plouffe in his 1992 dissertation. Gives sequence with an additional leading 1.
  • Mathematica
    CoefficientList[Series[(2 + x - 3x^2 - x^3)/(1 - 3x^2 + x^4), {x, 0, 40}], x]
    LinearRecurrence[{0,3,0,-1},{2,1,3,2},50] (* Harvey P. Dale, Oct 10 2012 *)
  • PARI
    a(n)=if(n%2,fibonacci(n),fibonacci(n+1)+fibonacci(n-1))
    

Formula

a(0)=2, a(1)=1, a(2)=3, a(n) = (1+a(n-1)a(n-2))/a(n-3), n >= 3. a(-n) = a(n).
G.f.: (2+x-3*x^2-x^3)/((1-x-x^2)*(1+x-x^2))
a(n) = F(n) if n odd, a(n) = L(n) if n even. a(n) = F(n+1)+(-1)^nF(n-1). - Mario Catalani (mario.catalani(AT)unito.it), Sep 20 2002
a(n) = ((5+sqrt(5))/10)*(((1+sqrt(5))/2)^n+((-1+sqrt(5))/2)^n)+((5-sqrt(5))/10)*(((1-sqrt(5))/2)^n+((-1-sqrt(5))/2)^n). With additional leading 1: a(n)=((sqrt(5))/5)*(((1+sqrt(5))/2)^n-((1-sqrt(5))/2)^n)+((5+3*sqrt(5))/10)*((-1+sqrt(5))/2)^n+((5-3*sqrt(5))/10)*((-1-sqrt(5))/2)^n. - Tim Monahan, Jul 25 2011
From Peter Bala, Jan 11 2013: (Start)
Let phi = 1/2*(sqrt(5) - 1). This sequence is the simple continued fraction expansion of the real number 1 + product {n >= 0} (1 + sqrt(5)*phi^(4*n+1))/(1 + sqrt(5)*phi^(4*n+3)) = 2.77616 23282 02325 23857 ... = 2 + 1/(1 + 1/(3 + 1/(2 + 1/(7 + ...)))). Cf. A005248.
Furthermore, for k = 0,1,2,... the simple continued fraction expansion of 1 + product {n >= 0} (1 + 1/5^k*sqrt(5)*phi^(4*n+1))/(1 + 1/5^k*sqrt(5)*phi^(4*n+3)) equals [2; 1*5^k, 3, 2*5^k, 7, 5*5^k, 18, 13*5^k, 47, ...]. (End)
a(n) = hypergeom([(1-n)/2, n mod 2 - n/2], [1 - n], -4) for n > 2. - Peter Luschny, Sep 03 2019
E.g.f.: 2*cosh(x/2)*(5*cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, Mar 15 2022

Extensions

Additional comments from Michael Somos, May 01 2000

A058036 Smallest primitive prime factor of the n-th Lucas number (A000032); i.e., L(n), L(0) = 2, L(1) = 1 and L(n) = L(n-1) + L(n-2).

Original entry on oeis.org

2, 1, 3, 1, 7, 11, 1, 29, 47, 19, 41, 199, 23, 521, 281, 31, 2207, 3571, 107, 9349, 2161, 211, 43, 139, 1103, 101, 90481, 5779, 14503, 59, 2521, 3010349, 1087, 9901, 67, 71, 103681, 54018521, 29134601, 79, 1601, 370248451, 83, 6709, 263, 181, 4969
Offset: 0

Views

Author

Robert G. Wilson v, Nov 16 2000

Keywords

Comments

A Lucas number can have more than one primitive factor; the primitive factors of L(22) are 43 and 307.

Crossrefs

Cf. A000032, A086600 (number of primitive prime factors in L(n)).
Cf. A001578 (analog for Fibonacci).

Programs

  • Mathematica
    a=3; b=-1; prms={}; Table[c=a+b; a=b; b=c; f=First/@FactorInteger[c]; p=Complement[f, prms]; prms=Join[prms, p]; If[p=={}, 1, First[p]], {47}]
  • PARI
    lucas(n) = fibonacci(n+1)+fibonacci(n-1); \\ A000032
    a(n) = {n++; my(v = vector(n, k, k--; lucas(k))); my(vf = vector(n, k, factor(v[k])[,1]~)); for (k=1, n-1, vf[n] = setminus(vf[n], vf[k]);); if (#vf[n], vecmin(vf[n]), 1);} \\ Michel Marcus, May 11 2021

A079451 Largest prime dividing the n-th Lucas number (A000032); 1 when no such prime exists.

Original entry on oeis.org

2, 1, 3, 2, 7, 11, 3, 29, 47, 19, 41, 199, 23, 521, 281, 31, 2207, 3571, 107, 9349, 2161, 211, 307, 461, 1103, 151, 90481, 5779, 14503, 19489, 2521, 3010349, 4481, 9901, 63443, 911, 103681, 54018521, 29134601, 859, 3041, 370248451, 1427, 144481, 967, 541, 275449
Offset: 0

Views

Author

Lekraj Beedassy, Jan 13 2003

Keywords

Crossrefs

Cf. A000032 (Lucas numbers), A006530 (greatest prime factor).
Cf. A001606 (indices of prime Lucas numbers <=> where a(n) = A000032(n)), subsequence of A076697 (indices of record values in this sequence).
Cf. A280104 (same for smallest prime factor).

Programs

Formula

a(n) = A006530(A000032(n)). - Felix Fröhlich, Dec 26 2016

Extensions

More terms from Michel Marcus, Oct 26 2013
Modified b-file and scripts so that a(1)=1. - David Radcliffe, Aug 03 2025

A082762 Trinomial transform of Lucas numbers (A000032).

Original entry on oeis.org

1, 8, 44, 232, 1216, 6368, 33344, 174592, 914176, 4786688, 25063424, 131233792, 687149056, 3597959168, 18839158784, 98643116032, 516502061056, 2704439902208, 14160631169024, 74146027405312, 388233639755776, 2032817728913408, 10643971814457344
Offset: 0

Views

Author

Emanuele Munarini, May 21 2003

Keywords

Crossrefs

Programs

  • Magma
    I:=[1, 8]; [n le 2 select I[n] else 6*Self(n-1)-4*Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 21 2017
  • Mathematica
    a[n_]:=(MatrixPower[{{2,2},{2,4}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    f[n_] := Block[{s = Sqrt@ 5}, Simplify[((1 + s)(3 + s)^n + (1 - s)(3 - s)^n)/2]]; Array[f, 21, 0] (* Robert G. Wilson v, Mar 07 2011 *)
    LinearRecurrence[{6,-4}, {1, 8}, 30] (* G. C. Greubel, Dec 21 2017 *)
  • PARI
    x='x+O('x^30); Vec((1 + 2*x)/(1 - 6*x + 4*x^2)) \\ G. C. Greubel, Dec 21 2017
    

Formula

a(n) = Sum_{k=0..2*n} Trinomial(n,k)*Lucas(k+1), where Trinomial(n,k) = trinomial coefficients (A027907).
a(n) = 2^n*Lucas(2*n+1), where Lucas = A000032.
From Philippe Deléham, Mar 01 2004: (Start)
a(n) = 2^n*A002878(n) = 2^(-n)*Sum_{k>=0} C(2*n+1,2*k)*5^k; see A091042.
a(0) = 1, a(1) = 8, a(n+1) = 6*a(n) - 4*a(n-1). (End)
From Al Hakanson (hawkuu(AT)gmail.com), Jul 13 2009: (Start)
a(n) = ((1+sqrt(5))*(3+sqrt(5))^n + (1-sqrt(5))*(3-sqrt(5))^n)/2.
Third binomial transform of 1, 5, 5, 25, 25, 125. (End)
G.f.: (1 + 2*x)/(1 - 6*x + 4*x^2). - Colin Barker, Mar 23 2012

A099923 Fourth powers of Lucas numbers A000032.

Original entry on oeis.org

16, 1, 81, 256, 2401, 14641, 104976, 707281, 4879681, 33362176, 228886641, 1568239201, 10750371856, 73680216481, 505022001201, 3461445366016, 23725169980801, 162614549665681, 1114577187760656, 7639424429247601
Offset: 0

Views

Author

Ralf Stephan, Nov 01 2004

Keywords

References

  • Arthur T. Benjamin and Jennifer J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 56.

Crossrefs

Fourth row of array A103324.

Programs

  • Magma
    [ Lucas(n)^4 : n in [0..120]]; // Vincenzo Librandi, Apr 14 2011
    
  • Mathematica
    LucasL[Range[0,20]]^4 (* or *) LinearRecurrence[{5,15,-15,-5,1},{16,1,81,256,2401},21] (* Harvey P. Dale, Jul 04 2014 *)
    CoefficientList[Series[(16 - 79 x - 164 x^2 + 76 x^3 + x^4)/((1 - x) (1 + 3*x+x^2)*(1-7*x+x^2)), {x,0,50}], x] (* G. C. Greubel, Dec 21 2017 *)
  • PARI
    for(n=0, 30, print1( (fibonacci(n+1) + fibonacci(n-1))^4, ", ")) \\ G. C. Greubel, Dec 21 2017
    
  • PARI
    x='x+O('x^30); Vec((16-79*x-164*x^2+76*x^3+x^4)/((1-x)*(1+3*x+x^2)*(1-7*x+x^2))) \\ G. C. Greubel, Dec 21 2017

Formula

a(n) = A000032(n)^4 = A001254(n)^2.
a(n) = L(4*n) + 4*(-1)^n*L(2*n) + 6.
a(n) = L(n-2)*L(n-1)*L(n+1)*L(n+2) + 25, for n >=1.
G.f.: (16-79*x-164*x^2+76*x^3+x^4)/((1-x)*(1+3*x+x^2)*(1-7*x+x^2)). [See Mansour p. 207] - R. J. Mathar, Oct 26 2008
a(0)=16, a(1)=1, a(2)=81, a(3)=256, a(4)=2401, a(n) = 5*a(n-1) + 15*a(n-2) - 15*a(n-3) - 5*a(n-4) + a(n-5). - Harvey P. Dale, Jul 04 2014
Sum_{i=0..n} a(i) = 11 + 6*n + 4*(-1)^n*F(2*n+1) + F(4*n+2), for F = A000045. - Adam Mohamed and Greg Dresden, Jul 02 2024
Product_{n>=2} (1 - 25/a(n)) = phi^5/18, where phi is the golden ratio (A001622) (Davlianidze, 2020). - Amiram Eldar, Dec 04 2024

A100107 Inverse Moebius transform of Lucas numbers (A000032) 1,3,4,7,11,..

Original entry on oeis.org

1, 4, 5, 11, 12, 26, 30, 58, 81, 138, 200, 355, 522, 876, 1380, 2265, 3572, 5880, 9350, 15272, 24510, 39806, 64080, 104084, 167773, 271968, 439285, 711530, 1149852, 1862022, 3010350, 4873112, 7881400, 12755618, 20633280, 33391491, 54018522, 87413156
Offset: 1

Views

Author

Jonathan Vos Post, Dec 26 2004

Keywords

Examples

			a(2) = 4 because the prime 2 is divisible only by 1 and 2, so L(1) + L(2) = 1 + 3 = 4.
a(3) = 5 because the prime 3 is divisible only by 1 and 3, so L(1) + L(3) = 1 + 4 = 5.
a(4) = 11 because the semiprime 4 is divisible only by 1, 2, 4, so L(1) + L(2) + L(4) = 1 + 3 + 7 = 11.
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat): a:=proc(n) local div: div:=divisors(n): sum(2*fibonacci(div[j]+1)-fibonacci(div[j]),j=1..tau(n)) end: seq(a(n),n=1..42); # Emeric Deutsch, Jul 31 2005
  • Mathematica
    Table[Plus @@ Map[Function[d, LucasL[d]], Divisors[n]], {n, 100}] (* T. D. Noe, Aug 14 2012 *)

Formula

a(n) = Sum_{d|n} Lucas(d) = Sum_{d|n} A000032(d).
G.f.: Sum_{k>=1} Lucas(k) * x^k/(1 - x^k) = Sum_{k>=1} x^k * (1 + 2*x^k)/(1 - x^k - x^(2*k)). - Ilya Gutkovskiy, Aug 14 2019
a(n) ~ phi^n, where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 10 2021

Extensions

More terms from Emeric Deutsch, Jul 31 2005

A111958 Lucas numbers (A000032) mod 8.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 28 2005

Keywords

Comments

This sequence has period-length 12.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1}, {2, 1, 3, 4, 7, 3, 2, 5, 7, 4, 3}, 105] (* Ray Chandler, Aug 27 2015 *)
    Mod[LucasL[Range[0, 99]], 8] (* Alonso del Arte, Dec 19 2015 *)

Formula

From G. C. Greubel, Feb 08 2016: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) - a(n-6) + a(n-7) - a(n-8) + a(n-9) - a(n-10) + a(n-11).
a(n+12) = a(n). (End)

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.
Previous Showing 31-40 of 1497 results. Next