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

A049559 a(n) = gcd(n - 1, phi(n)).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 4, 1, 22, 1, 4, 1, 2, 3, 28, 1, 30, 1, 4, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 4, 1, 46, 1, 6, 1, 2, 3, 52, 1, 2, 1, 4, 1, 58, 1, 60, 1, 2, 1, 16, 5, 66, 1, 4, 3, 70, 1, 72, 1, 2, 3, 4, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 18, 1, 4
Offset: 1

Views

Author

Labos Elemer, Dec 28 2000

Keywords

Comments

For prime n, a(n) = n - 1. Question: do nonprimes exist with this property?
Answer: No. If n is composite then a(n) < n - 1. - Charles R Greathouse IV, Dec 09 2013
Lehmer's totient problem (1932): are there composite numbers n such that a(n) = phi(n)? - Thomas Ordowski, Nov 08 2015
a(n) = 1 for n in A209211. - Robert Israel, Nov 09 2015

Examples

			a(9) = 2 because phi(9) = 6 and gcd(8, 6) = 2.
a(10) = 1 because phi(10) = 4 and gcd(9, 4) = 1.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, B37.

Crossrefs

Programs

  • Magma
    [Gcd(n-1, EulerPhi(n)): n in [1..80]]; // Vincenzo Librandi, Oct 13 2018
  • Maple
    seq(igcd(n-1, numtheory:-phi(n)), n=1..100); # Robert Israel, Nov 09 2015
  • Mathematica
    Table[GCD[n - 1, EulerPhi[n]], {n, 93}] (* Michael De Vlieger, Nov 09 2015 *)
  • PARI
    a(n)=gcd(eulerphi(n),n-1) \\ Charles R Greathouse IV, Dec 09 2013
    
  • Python
    from sympy import totient, gcd
    print([gcd(totient(n), n - 1) for n in range(1, 101)]) # Indranil Ghosh, Mar 27 2017
    

Formula

a(p^m) = a(p) = p - 1 for prime p and m > 0. - Thomas Ordowski, Dec 10 2013
From Antti Karttunen, Sep 09 2018: (Start)
a(n) = A000010(n) / A160595(n) = A063994(n) / A318829(n).
a(n) = n - A318827(n) = A000010(n) - A318830(n).
(End)
a(n) = gcd(A000010(n), A219428(n)) = gcd(A000010(n), A318830(n)). - Antti Karttunen, Jan 05 2021

A083538 a(n) = sigma(n)*sigma(n+1)/gcd(sigma(n+1), sigma(n))^2.

Original entry on oeis.org

3, 12, 28, 42, 2, 6, 120, 195, 234, 6, 21, 2, 84, 1, 744, 558, 78, 780, 210, 336, 72, 6, 10, 1860, 1302, 420, 35, 420, 60, 36, 2016, 336, 72, 72, 4368, 3458, 570, 210, 1260, 105, 112, 264, 231, 182, 156, 6, 372, 7068, 589, 744, 1764, 1323, 180, 15, 15, 6, 72, 6, 70
Offset: 1

Views

Author

Labos Elemer, May 21 2003

Keywords

Comments

a(n) = A060781(n)/A060780(n) = A083539(n)/A060780(n)^2; quotient when lcm(sigma(n+1), sigma(n)) is divided by gcd(sigma(n+1), sigma(n)).

Examples

			n=10: sigma(10)=18, sigma(11)=12, lcm(18, 12)=36, gcd(18, 12)=6, a(10) = 36/6 = 6.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := DivisorSigma[1, x] t=Table[LCM[f[w+1], f[w]]/GCD[f[w+1], f[w]], {w, 1, 128}]
    Times@@#/(GCD@@#)^2&/@Partition[DivisorSigma[1,Range[60]],2,1] (* Harvey P. Dale, Feb 17 2016 *)
  • PARI
    a(n)=my(x=sigma(n),y=sigma(n+1)); x*y/gcd(x,y)^2 \\ Charles R Greathouse IV, Mar 09 2014

Extensions

Edited by N. J. A. Sloane, Apr 29 2007
Corrections by Charles R Greathouse IV, Mar 09 2014

A083542 a(n) = phi(n+1)*phi(n), product of totients of two consecutive integers.

Original entry on oeis.org

1, 2, 4, 8, 8, 12, 24, 24, 24, 40, 40, 48, 72, 48, 64, 128, 96, 108, 144, 96, 120, 220, 176, 160, 240, 216, 216, 336, 224, 240, 480, 320, 320, 384, 288, 432, 648, 432, 384, 640, 480, 504, 840, 480, 528, 1012, 736, 672, 840, 640, 768, 1248, 936, 720, 960, 864, 1008
Offset: 1

Views

Author

Labos Elemer, May 21 2003

Keywords

Crossrefs

Programs

  • Haskell
    a083542 n = a000010 n * a000010 (n + 1)
    a083542_list = zipWith (*) (tail a000010_list) a000010_list
    -- Reinhard Zumkeller, Apr 22 2012
    
  • Maple
    a:= n-> (p-> p(n)*p(n+1))(numtheory[phi]):
    seq(a(n), n=1..60);  # Alois P. Heinz, Jan 21 2022
  • Mathematica
    Times @@ EulerPhi@ # & /@ Partition[Range@ 58, 2, 1] (* Michael De Vlieger, Mar 25 2017 *)
    Times@@@Partition[EulerPhi[Range[60]],2,1] (* Harvey P. Dale, Oct 29 2019 *)
  • PARI
    a(n) = eulerphi(n) * eulerphi(n+1); \\ Amiram Eldar, Jul 10 2024

Formula

a(n) = A000010(A002378(n)). - Amiram Eldar, Jul 10 2024
Sum_{k=1..n} a(k) = c * n^3 / 3 + O((n*log(n))^2), where c = Product_{p prime} (1 - 2/p^2) = 0.322634... (A065474). - Amiram Eldar, Dec 09 2024
a(n) = A058515(n)*A066813(n). - Amiram Eldar, May 07 2025

A049586 a(n) is the GCD of the cototients (A051953) of n and n+1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 3, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3
Offset: 0

Views

Author

Labos Elemer, Dec 28 2000

Keywords

Comments

Most of the terms are 1.

Crossrefs

Programs

  • Magma
    [GCD((n+1-EulerPhi(n+1)), n-EulerPhi(n)): n in [1..100]]; // Vincenzo Librandi, Aug 10 2017
  • Mathematica
    Map[GCD @@ Map[# - EulerPhi@ # &, #] &, Partition[Range@ 106, 2, 1]] (* Michael De Vlieger, Aug 09 2017 *)

Formula

a(n) = gcd(n + 1 - phi(n+1), n - phi(n)).
a(n) = gcd(A051953(n+1), A051953(n)).

A066813 a(n) = lcm(phi(n), phi(n+1)).

Original entry on oeis.org

1, 2, 2, 4, 4, 6, 12, 12, 12, 20, 20, 12, 12, 24, 8, 16, 48, 18, 72, 24, 60, 110, 88, 40, 60, 36, 36, 84, 56, 120, 240, 80, 80, 48, 24, 36, 36, 72, 48, 80, 120, 84, 420, 120, 264, 506, 368, 336, 420, 160, 96, 312, 468, 360, 120, 72, 252, 812, 464, 240, 60, 180, 288, 96
Offset: 1

Views

Author

Benoit Cloitre, Jan 20 2002

Keywords

Crossrefs

Cf. A000010 (phi), A058515, A083542.

Programs

  • Mathematica
    LCM@@EulerPhi[#]&/@Partition[Range[100],2,1] (* Harvey P. Dale, May 07 2011 *)
  • PARI
    a(n) = { lcm(eulerphi(n), eulerphi(n+1)) } \\ Harry J. Smith, Mar 29 2010

Formula

a(n) = A083542(n)/A058515(n). - Amiram Eldar, May 07 2025

A083545 Numbers k such that the geometric mean of the Euler totient function of k and k+1 is an integer.

Original entry on oeis.org

1, 3, 15, 19, 95, 104, 125, 164, 194, 255, 259, 341, 491, 495, 504, 512, 513, 584, 591, 629, 679, 755, 775, 975, 1024, 1147, 1247, 1254, 1260, 1313, 1358, 1463, 1469, 1538, 1615, 1728, 1919, 1962, 1970, 2047, 2071, 2090, 2204, 2299, 2321, 2345, 2404, 2625
Offset: 1

Views

Author

Labos Elemer, May 21 2003

Keywords

Examples

			19 is a term since phi(19) = 18, phi(20) = 8, 8*18 = 144 = 12^2.
		

Crossrefs

Programs

Formula

a(n) = x is such that sqrt(A000010(x)*A000010(x+1)) is an integer. Values of solutions x to phi(x) * phi(x+1) = A083542(x) = y^2.

A083546 The geometric mean of the Euler totient function of 2 consecutive integers {k, k+1} when it is an integer.

Original entry on oeis.org

1, 2, 8, 12, 48, 48, 60, 80, 96, 128, 144, 180, 280, 240, 240, 288, 288, 288, 336, 288, 384, 360, 480, 480, 640, 720, 672, 600, 576, 720, 720, 720, 672, 864, 960, 864, 960, 1080, 1008, 1408, 1296, 960, 1008, 1320, 1260, 1056, 1440, 1200, 1728, 1440, 1296
Offset: 1

Views

Author

Labos Elemer, May 21 2003

Keywords

Examples

			12 is a term since sqrt(phi(19) * phi(20)) = sqrt(18 * 8) = sqrt(144) = 12.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := EulerPhi[x]; Do[s=Sqrt[f[n+1]*f[n]]; If[IntegerQ[s], Print[s]], {n, 1, 5000}]
    Select[Sqrt[#]&/@(Times@@@Partition[EulerPhi[Range[3000]],2,1]),IntegerQ] (* Harvey P. Dale, Nov 04 2020 *)

Formula

a(n) = sqrt(A000010(x) * A000010(x+1)) = sqrt(phi(x) * phi(x+1)) = sqrt(A083542(x)) where x = A083545(n).

A063444 Smallest number such that GCD of EulerPhi of 2 consecutive integer equals 2n.

Original entry on oeis.org

3, 12, 13, 15, 121, 35, 86, 64, 37, 99, 726, 72, 158, 196, 61, 96, 4931, 73, 7639, 175, 343, 267, 2302, 104, 250, 676, 162, 637, 3481, 154, 21142, 192, 2178, 411, 5041, 814, 446, 1145, 157, 164, 6971, 1348, 14878, 1334, 542, 2115, 22090, 193, 2842, 2200
Offset: 1

Views

Author

Labos Elemer, Jul 24 2001

Keywords

Examples

			n = 10, a(10) = 99, Phi(99) = 60, Phi(100) = 40, GCD[60,40] = 2n = 20.
		

Crossrefs

Programs

  • PARI
    { for (n=1, 350, x=1; while (gcd(eulerphi(x+1), eulerphi(x)) != 2*n, x++); write("b063444.txt", n, " ", x) ) } \\ Harry J. Smith, Aug 21 2009

Formula

Min{x; GCD[Phi[x+1], Phi[x]]=2n}=Min{x; A058515[x]=2n}

A058656 a(n) = gcd(n+1, phi(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 8, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 12, 1, 2, 3, 8, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 8, 1, 2, 1, 4, 1, 2, 1, 24, 1, 2, 3, 20, 1, 2, 1
Offset: 1

Views

Author

Labos Elemer, Dec 28 2000

Keywords

Comments

Compare sequences gcd(x, phi(n)), where x = n-1, n, or n+1.

Examples

			For n = 12, 13, 14, 15: n+1 = 13, 14, 15, 16; phi(n) = 4, 12, 12, 8; a(n) = gcd(13,4), gcd(14,12), gcd(15,12), gcd(16,8) = 1, 2, 3, 8, respectively.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[n+1,EulerPhi[n]],{n,110}] (* Harvey P. Dale, Nov 17 2011 *)
  • PARI
    a(n) = gcd(n+1, eulerphi(n)); \\ Amiram Eldar, Mar 13 2025

Extensions

Offset corrected by Sean A. Irvine, Aug 11 2022

A070010 GCD of consecutive values of sum-of-proper divisors.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 11, 1, 1, 1, 6, 2, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 23, 1, 1, 1, 1, 3, 1, 1, 5, 25, 1, 1, 1, 1, 3, 1, 1, 1, 1
Offset: 1

Views

Author

Labos Elemer, Apr 11 2002

Keywords

Crossrefs

Cf. A000203, A001065; GCD of various consecutive function values: A048586, A057467, A058515, A060778, A060780, A069896.

Programs

Formula

a(n) = gcd(A001065(n+1), A001065(n)).
Showing 1-10 of 10 results.