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

A067890 Primes p such that phi(p+1) = phi(p-1).

Original entry on oeis.org

5, 11, 71, 911, 1609, 2591, 4339, 15401, 58309, 59149, 80989, 208391, 215389, 496511, 589189, 1809079, 1970149, 3167569, 3260809, 3516109, 5914369, 9832271, 12231311, 13608071, 14470061, 16537151, 16692551, 19018369, 19462661
Offset: 1

Views

Author

Benoit Cloitre, Mar 02 2002

Keywords

Comments

Primes in A066812.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[124*10^4]],EulerPhi[#-1]==EulerPhi[#+1]&] (* Harvey P. Dale, Apr 09 2019 *)
  • PARI
    v=[]; forprime(p=2,40000000,if(eulerphi(p+1)==eulerphi(p-1),v=concat(v,p))); v

Formula

a(n) = prime(A066902(n)). - Giovanni Resta, Apr 06 2020

Extensions

More terms from Rick L. Shepherd, May 03 2002

A192221 Numbers n such that phi(n-2)=phi(n+2) where phi=A000010.

Original entry on oeis.org

10, 16, 18, 22, 37, 54, 66, 93, 142, 150, 246, 294, 405, 457, 618, 630, 774, 803, 1013, 1026, 1110, 1146, 1254, 1272, 1297, 1458, 1590, 1686, 1822, 1830, 2032, 2166, 2454, 2625, 2646, 2662, 2694, 2934, 3030, 3218, 3323, 3510, 3990, 4266, 4342, 4374, 4614, 4806, 4854, 4950, 5182, 5286
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2011

Keywords

Crossrefs

Programs

Formula

a(n) = A179186(n)+2. - R. J. Mathar, Jun 26 2011

A276052 Least k > 1 such that phi(k*n-1) = phi(k*n+1), or -1 if no such k exists.

Original entry on oeis.org

5, 4, 3, 2, 15, 106, 21, 127, 3, 39282, 3, 53, 135, 65014, 5, 9489, 171, 361, 27, 19641, 7, 13133, 141, 6326, 3, 6978, 19, 32507, 375, 13094, 165, 93186, 19, 1359, 9, 12588, 15, 171, 45, 35253, 3, 35794, 9, 16796, 7, 1689, 69, 3163, 3, 13653, 57, 3489, 12, 249, 45, 58497, 9
Offset: 1

Views

Author

Altug Alkan, Aug 17 2016

Keywords

Comments

Least k > 1 such that k*n is in A066812. - Robert Israel, Aug 30 2016

Examples

			a(5) = 15 because phi(15*5-1) = phi(15*5+1).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
       for k from 2 do if numtheory:-phi(k*n-1) = numtheory:-phi(k*n+1) then
          return k
       fi od end proc:
    map(f, [$1..60]); # Robert Israel, Aug 30 2016
  • Mathematica
    kmax = 10^9;
    a[n_] := Module[{k}, For[k = 2, k <= kmax, k++, If[EulerPhi[k n - 1] == EulerPhi[k n + 1] , Print[n, " ", k]; Return[k]]]; -1];
    Array[a, 60] (* Jean-François Alcover, Oct 06 2020 *)
  • PARI
    a(n) = {my(k = 2); while (eulerphi(k*n+1) != eulerphi(k*n-1), k++); k; }

Extensions

Name corrected by Robert Israel, Aug 30 2016

A276373 Least k such that phi(k*n-1) = phi(k*n+1), or -1 if no such k exists.

Original entry on oeis.org

5, 4, 3, 2, 1, 106, 21, 1, 1, 39282, 1, 53, 135, 65014, 5, 9489, 171, 361, 27, 19641, 7, 13133, 141, 6326, 3, 6978, 1, 32507, 375, 13094, 165, 93186, 1, 1359, 9, 12588, 15, 171, 45, 35253, 3, 35794, 9, 16796, 7, 1689, 69, 3163, 3, 13653, 57, 3489, 12, 249, 45, 58497, 9
Offset: 1

Views

Author

Altug Alkan and Robert Israel, Aug 31 2016

Keywords

Comments

Least k such that k*n is in A066812.
If n is in A066812 then a(n) = 1, otherwise a(n) = A276052(n).

Examples

			a(5) = 15 because phi(15*5-1) = phi(15*5+1).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
       for k from 1 do if numtheory:-phi(k*n-1) = numtheory:-phi(k*n+1) then
          return k
       fi od end proc:
    map(f, [$1..60]);
  • Mathematica
    kmax = 10^8;
    a[n_] := For[k = 1, k <= kmax, k++, If[EulerPhi[k*n - 1] == EulerPhi[k*n + 1], Print[n, " ", k]; Return[k]]] /. Null -> -1;
    Table[a[n], {n, 1, 1000}] (* Jean-François Alcover, Jun 03 2024 *)

A303549 Lesser of twin primes p for which phi(p-1) = phi(p+1), where phi(n) is the Euler totient function (A000010).

Original entry on oeis.org

5, 11, 71, 2591, 208391, 16692551, 48502931, 92012201, 249206231, 419445251, 496978301, 1329067391, 1837151681, 2277479051, 2647600061, 4733566391, 6435087011, 10327948751, 14089345691, 14923624031, 22415286251, 27508270301, 39662281331, 59013882071, 70353395351
Offset: 1

Views

Author

Amiram Eldar, Apr 26 2018

Keywords

Comments

Intersection of A001359 and A067890 (or A066812).
The terms below 10^8 were taken from the paper by Garcia et al.

Examples

			p = 5 is the lesser of the twin primes (5, 7), and phi(5-1) = phi(5+1) = 2.
		

Crossrefs

Programs

  • Mathematica
    seq={}; Do[p = Prime[i]; If[PrimeQ[p+2] && EulerPhi[p-1] == EulerPhi[p+1], AppendTo[seq, p]], {i, 1, 1000000}]; seq
  • PARI
    isok(p) = isprime(p) && isprime(p+2) && (eulerphi(p-1) == eulerphi(p+1)); \\ Michel Marcus, Apr 26 2018

Extensions

a(12)-a(16) from Michel Marcus, Apr 26 2018
a(17)-a(25) from Giovanni Resta, Apr 26 2018

A275998 Numbers n such that phi(n^2-1) = phi(n^2+1).

Original entry on oeis.org

3, 27, 267, 8820000
Offset: 1

Views

Author

Altug Alkan, Aug 16 2016

Keywords

Comments

No other terms below 10^8. - Michel Marcus, Aug 17 2016

Examples

			3 is a term because phi(3^2-1) = phi(3^2+1).
		

Crossrefs

Programs

  • Magma
    [n: n in [2..100000] | EulerPhi(n^2-1) eq EulerPhi(n^2+1)]; // Vincenzo Librandi, Aug 18 2016
  • Mathematica
    Select[Range@10000000, EulerPhi@(#^2 - 1) ==  EulerPhi[#^2 + 1] &] (* Vincenzo Librandi, Aug 18 2016 *)
  • PARI
    isok(n) = eulerphi(n^2-1) == eulerphi(n^2+1); \\ Michel Marcus, Aug 16 2016
    

A380091 Primes p such that phi(p+1) = 2*phi(p-1) where phi = A000010.

Original entry on oeis.org

2, 3, 7, 31, 991, 1951, 2521, 7411, 23431, 26731, 37441, 92431, 131071, 396631, 489061, 532141, 830551, 2811691, 3319171, 3698941, 4247167, 5239411, 6829681, 8326711, 8997871, 12625831, 12889231, 14756743, 15891121, 16125721, 16446301, 21203071
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 11 2025

Keywords

Comments

Primes in A258454 - 1.

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(15*10^6) | 2*EulerPhi(p-1) eq EulerPhi(p+1)];
  • Mathematica
    Select[Prime[Range[10^5]], EulerPhi[# + 1] == 2*EulerPhi[# - 1] &] (* Amiram Eldar, Jan 12 2025 *)
Showing 1-7 of 7 results.