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-4 of 4 results.

A087215 Lucas(6*n): a(n) = 18*a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 18.

Original entry on oeis.org

2, 18, 322, 5778, 103682, 1860498, 33385282, 599074578, 10749957122, 192900153618, 3461452808002, 62113250390418, 1114577054219522, 20000273725560978, 358890350005878082, 6440026026380244498, 115561578124838522882, 2073668380220713167378
Offset: 0

Views

Author

Nikolay V. Kosinov (kosinov(AT)unitron.com.ua), Oct 19 2003

Keywords

Comments

a(n+1)/a(n) converges to 9 + sqrt(80) = 17.9442719... a(0)/a(1) = 2/18; a(1)/a(2) = 18/322; a(2)/a(3) = 322/5778; a(3)/a(4) = 5778/103682; etc.
Lim_{n -> oo} a(n)/a(n+1) = 0.05572809000084... = 1/(9 + sqrt(80)) = 9 - sqrt(80).
From Peter Bala, Oct 13 2019: (Start)
Let F(x) = Product_{n >= 0} (1 + x^(4*n+1))/(1 + x^(4*n+3)). Let Phi = (1/2)*(sqrt(5) - 1). This sequence gives the partial denominators in the simple continued fraction expansion of the number F(Phi^6) = 1.0555459720... = 1 + 1/(18 + 1/(322 + 1/(5778 + ...))).
Also F(-Phi^6) = 0.9444348576... has the continued fraction representation 1 - 1/(18 - 1/(322 - 1/(5788 - ...))) and the simple continued fraction expansion 1/(1 + 1/((18 - 2) + 1/(1 + 1/((322 - 2) + 1/(1 + 1/((5788 - 2) + 1/(1 + ...))))))).
F(Phi^6)*F(-Phi^6) = 0.9968944099... has the simple continued fraction expansion 1/(1 + 1/((18^2 - 4) + 1/(1 + 1/((322^2 - 4) + 1/(1 + 1/((5788^2 - 4) + 1/(1 + ...))))))).
1/2 + (1/2)*F(Phi^6)/F(-Phi^6) = 1.0588241282... has the simple continued fraction expansion 1 + 1/((18 - 2) + 1/(1 + 1/((5778 - 2) + 1/(1 + 1/(1860498 - 2) + 1/(1 + ...))))). (End)

Examples

			a(4) = 103682 = 18*a(3) - a(2) = 18*5778 - 322 = (9 + sqrt(80))^4 + (9 - sqrt(80))^4 = 103681.99999035512... + 0.00000964487... = 103682.
		

References

  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 91.
  • R. P. Stanley. Enumerative combinatorics. Vol. 2, volume 62 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, 1999.

Crossrefs

Cf. A074919.
Row 2 * 2 of array A188645.
Cf. Lucas(k*n): A000032 (k = 1), A005248 (k = 2), A014448 (k = 3), A056854 (k = 4), A001946 (k = 5), A087281 (k = 7), A087265 (k = 8), A087287 (k = 9), A065705 (k = 10), A089772 (k = 11), A089775 (k = 12).

Programs

  • Magma
    [ Lucas(6*n) : n in [0..100]]; // Vincenzo Librandi, Apr 14 2011
    
  • Mathematica
    a[0] = 2; a[1] = 18; a[n_] := 18a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 15}] (* Robert G. Wilson v, Jan 30 2004 *)
    Table[LucasL[6n], {n, 0, 18}]  (* or *) CoefficientList[Series[2*(1 - 9*x)/(1 - 18*x + x^2), {x, 0, 17}], x] (* Indranil Ghosh, Mar 15 2017 *)
  • PARI
    Vec(2*(1-9*x)/(1-18*x+x^2) + O(x^20)) \\ Colin Barker, Jan 24 2016
    
  • PARI
    a(n) = if(n<2, 17^n + 1, 18*a(n - 1) - a(n - 2));
    for(n=0, 17, print1(a(n),", ")) \\ Indranil Ghosh, Mar 15 2017

Formula

a(n) = A000032(6*n).
a(n) = 18*a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 18.
a(n) = (9 + sqrt(80))^n + (9 - sqrt(80))^n.
G.f.: 2*(1-9*x)/(1-18*x+x^2). - Philippe Deléham, Nov 17 2008
a(n) = 2*A023039(n). - R. J. Mathar, Oct 22 2010
From Peter Bala, Oct 13 2019: (Start)
a(n) = F(6*n+6)/F(6) - F(6*n-6)/F(6) = A049660(n+1) - A049660(n-1).
a(n) = trace(M^n), where M is the 2 X 2 matrix [0, 1; 1, 1]^6 = [5, 8; 8, 13].
Consequently the Gauss congruences hold: a(n*p^k) = a(n*p^(k-1)) ( mod p^k ) for all prime p and positive integers n and k. See Zarelua and also Stanley (Ch. 5, Ex. 5.2(a) and its solution).
16*Sum_{n >= 1} 1/(a(n) - 20/a(n)) = 1: (20 = Lucas(6) + 2 and 16 = Lucas(6) - 2)
20*Sum_{n >= 1} (-1)^(n+1)/(a(n) + 16/a(n)) = 1.
Series acceleration formulas for sum of reciprocals:
Sum_{n >= 1} 1/a(n) = 1/16 - 20*Sum_{n >= 1} 1/(a(n)*(a(n)^2 - 20)).
Sum_{n >= 1} (-1)^(n+1)/a(n) = 1/20 + 16*Sum_{n >= 1} (-1)^(n+1)/(a(n)*(a(n)^2 + 16)).
Sum_{n >= 1} 1/a(n) = ( (theta_3(9-4*sqrt(5)))^2 - 1 )/4 and
Sum_{n >= 1} (-1)^(n+1)/a(n) = ( 1 - (theta_3(4*sqrt(5)-9))^2 )/4,
where theta_3(x) = 1 + 2*Sum_{n >= 1} x^(n^2) (see A000122). Cf. A153415 and A003499.
x*exp(Sum_{n >= 1} a(n)*x^/n) = x + 18*x^2 + 323*x^3 + ... is the o.g.f. for A049660. (End)
E.g.f.: 2*exp(9*x)*cosh(4*sqrt(5)*x). - Stefano Spezia, Oct 18 2019
a(n) = L(2n-1)^2 * F(2n+1) + L(2n+1)^2 * F(2n-1), where F(n) = A000045(n) and L(n) = A000032(n). - Diego Rattaggi, Nov 12 2020
From Peter Bala, Apr 16 2025: (Start)
a(n) = Lucas(2*n)^3 - 3*Lucas(2*n) = 2*T(3, (1/2)*Lucas(2*n)), where T(k, x) denotes the k-th Chebyshev polynomial of the first kind; more generally, for k >= 0, Lucas(2*k*n) = 2*T(k, Lucas(2*n)/2).
Sum_{n >= 1} 1/a(n) = (1/4) * (theta_3(9 - sqrt(80))^2 - 1) and
Sum_{n >= 1} (-1)^(n+1)/a(n) = (1/4) * (1 - theta_3(sqrt(80) - 9)^2), where theta_3(x) = 1 + 2*Sum_{n >= 1} x^(n^2) (see A000122). See Borwein and Borwein, Proposition 3.5 (i), p. 91. Cf. A153415 and A003499. (End)

A129139 a(n) = number of positive integers which are coprime to n and are <= d(n), where d(n) = A000005(n).

Original entry on oeis.org

1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 3, 2, 4, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 4, 3, 3, 2, 2, 3, 2, 2, 4, 4, 4, 3, 2, 3, 3, 2, 2, 4, 2, 2, 3, 3, 4, 3, 2, 4, 4, 2, 2, 3, 4, 2, 3, 4, 2, 3, 4, 3, 3, 2, 4, 4, 2, 3, 4, 4, 2, 3, 2, 4, 4
Offset: 1

Views

Author

Leroy Quet, Mar 30 2007

Keywords

Examples

			d(16) = 5. So a(16) is the number of integers coprime to 16 which are <= 5. There are 3 such integers: 1, 3, 5; so a(16) = 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local ct,j: ct:=0: for j from 1 to tau(n) do if gcd(j,n)=1 then ct:=ct+1 else fi od: ct; end: seq(a(n),n=1..140); # Emeric Deutsch, Apr 02 2007
  • Mathematica
    A129139[n_] := Count[CoprimeQ[Range[DivisorSigma[0, n]], n], True];
    Array[A129139, 100] (* Paolo Xausa, Mar 27 2025 *)
  • PARI
    A129139(n) = sum(k=1,numdiv(n),(1==gcd(k,n))); \\ Antti Karttunen, Apr 01 2021

Formula

a(n) = Sum_{d|n} mu(d)*floor(tau(n)/d). - Ridouane Oudra, Mar 26 2025

Extensions

More terms from Emeric Deutsch, Apr 02 2007

A129138 a(n) = number of positive divisors of n that are <= phi(n), where phi(n) = A000010(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 3, 4, 1, 4, 1, 4, 3, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 3, 2, 3, 7, 1, 2, 3, 6, 1, 5, 1, 4, 5, 2, 1, 8, 2, 4, 3, 4, 1, 6, 3, 6, 3, 2, 1, 9, 1, 2, 5, 6, 3, 5, 1, 4, 3, 6, 1, 10, 1, 2, 5, 4, 3, 5, 1, 8, 4, 2, 1, 9, 3, 2, 3, 6, 1, 9, 3, 4, 3, 2, 3, 10, 1, 4, 5, 7, 1, 5, 1, 6
Offset: 1

Views

Author

Leroy Quet, Mar 30 2007

Keywords

Examples

			phi(16) = 8. So a(16) is the number of divisors of 16 which are <= 8. There are 4 such divisors: 1, 2, 4, 8; so a(16) = 4.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local div, ct, j: div:=divisors(n): ct:=0: for j from 1 to tau(n) do if div[j]<=phi(n) then ct:=ct+1 else ct:=ct: fi od: ct; end: seq(a(n),n=1..135); # Emeric Deutsch, Mar 31 2007
  • Mathematica
    Table[Length[Select[Divisors[n], # <= EulerPhi[n] &]], {n, 104}] (* Jayanta Basu, May 23 2013 *)
  • PARI
    a(n)=my(p=eulerphi(n));#select(k->k<=p,divisors(n)) \\ Charles R Greathouse IV, Mar 05 2013

Extensions

More terms from Emeric Deutsch, Mar 31 2007

A074818 Number of integers in {1, 2, ..., prime(n)} that are coprime to n.

Original entry on oeis.org

2, 2, 4, 4, 9, 5, 15, 10, 16, 12, 29, 13, 38, 19, 26, 27, 56, 21, 64, 29, 42, 36, 80, 30, 78, 47, 69, 46, 106, 31, 123, 66, 84, 66, 103, 51, 153, 78, 104, 70, 175, 52, 187, 88, 106, 96, 207, 75, 195, 92, 147, 111, 237, 84, 187, 113, 170, 131, 273, 75, 279, 142, 176
Offset: 1

Views

Author

Joseph L. Pe, Oct 04 2002

Keywords

Comments

Compare the definition of a(n) to phi(n) = number of integers in {1, 2, ..., n} that are coprime to n.

Examples

			There are five numbers in {1, 2, ..., prime(6) = 13} that are coprime to 6, i.e. 1, 5, 7, 11, 13. Hence a(6) = 5.
		

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add(mobius(d)*floor(ithprime(n)/d), d in divisors(n)), n=1..100) ; # Ridouane Oudra, Jun 04 2025
  • Mathematica
    h[n_] := Module[{l}, l = {}; For[i = 1, i <= Prime[n], i++, If[GCD[i, n] == 1, l = Append[l, i]]]; l]; Table[Length[h[i]], {i, 1, 100}]
  • PARI
    a(n) = sum(k=1, prime(n), gcd(k, n)==1); \\ Michel Marcus, Jun 04 2025
    
  • PARI
    a(n) = my(p = prime(n)); eulerphi(n) * (p \ n) + sum(i = (p \ n)*n + 1, p, gcd(i, n) == 1); \\ David A. Corneth, Jun 04 2025

Formula

a(n) = Sum_{d|n} mu(d)*floor(prime(n)/d). - Ridouane Oudra, Jun 04 2025
Showing 1-4 of 4 results.