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 11 results. Next

A001274 Numbers k such that phi(k) = phi(k+1).

Original entry on oeis.org

1, 3, 15, 104, 164, 194, 255, 495, 584, 975, 2204, 2625, 2834, 3255, 3705, 5186, 5187, 10604, 11715, 13365, 18315, 22935, 25545, 32864, 38804, 39524, 46215, 48704, 49215, 49335, 56864, 57584, 57645, 64004, 65535, 73124, 105524, 107864, 123824, 131144, 164175, 184635
Offset: 1

Views

Author

Keywords

Comments

Unlike totients, cototient(x + 1) = cototient(x) never holds (except 2 - phi(2) = 3 - phi(3) = 1) because cototient(x) is congruent to x modulo 2. - Labos Elemer, Aug 08 2001
Lal-Gillard and Firoozbakht ask whether there is another pair of consecutive integers in this sequence, apart from a(16) + 1 = a(17) = 5187, see link. - M. F. Hasler, Jan 05 2011
There are 5236 terms less than 10^12. - Jud McCranie, Feb 13 2012
Up to 10^13 there are 10755 terms, and no further consecutive pairs like (5186, 5187). - Giovanni Resta, Feb 27 2014
A051179(k) for k from 0 to 5 are in the sequence. No other members of A051179 are in the sequence, because phi(2^(2^k)-1) = Product_{j=1..k-1} phi(2^(2^j)+1) and phi(2^(2^5)+1) < 2^(2^5) so if k > 5, phi(2^(2^k)-1) < Product_{j=1..k-1} 2^(2^j) = 2^(2^k-1) = phi(2^(2^k)). - Robert Israel, Mar 31 2015
Number of terms < 10^k, k=1,2,3,...: 2, 3, 10, 17, 36, 68, 142, 306, 651, 1267, 2567, 5236, 10755, ..., . - Robert G. Wilson v, Apr 10 2019
Conjecture: Except for the first two terms, all terms are composite and congruent to either 2 or 3 (mod 6). - Robert G. Wilson v, Apr 10 2019
Paul Kinlaw has noticed that up to 10^13 the only counterexample to the above conjecture is a(7424) = 3044760173455. - Giovanni Resta, May 23 2019

Examples

			phi(3) = phi(4) = 2, so 3 is in the sequence.
phi(15) = phi(16) = 8, so 15 is in the sequence.
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 15, pp 5, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems Number Theory, Sect. B36.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a001274 n = a001274_list !! (n-1)
    a001274_list = map (+ 1) $ elemIndices 0 $
                               zipWith (-) (tail a000010_list) a000010_list
    -- Reinhard Zumkeller, May 20 2014, Mar 31 2011
    
  • Magma
    [n: n in [1..3*10^5] | EulerPhi(n) eq EulerPhi(n+1)]; // Vincenzo Librandi, Apr 14 2015
  • Maple
    select(n -> numtheory:-phi(n) = numtheory:-phi(n+1), [$1..10^5]); # Robert Israel, Mar 31 2015
  • Mathematica
    Reap[For[n = 1; k = 2; f1 = 1, k <= 10^9, k++, f2 = EulerPhi[k]; If[f1 == f2, Print["a(", n, ") = ", k - 1]; Sow[k - 1]; n++]; f1 = f2]][[2, 1]] (* Jean-François Alcover, Mar 29 2011, revised Dec 26 2013 *)
    Flatten[Position[Partition[EulerPhi[Range[200000]],2,1],{x_,x_}]] (* Harvey P. Dale, Dec 27 2015 *)
    Select[Range[1000], EulerPhi[#] == EulerPhi[# + 1] &] (* Alonso del Arte, Oct 03 2014 *)
    SequencePosition[EulerPhi[Range[200000]],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 01 2018 *)
    k = 8; lst = {1, 3}; While[k < 200000, If[ !PrimeQ[k +1], ep = EulerPhi[k +1]; If[ EulerPhi[k] == ep, AppendTo[lst, k]]; If[ep == EulerPhi[k +2], AppendTo[lst, k +1]]]; k += 6]; lst (* Robert G. Wilson v, Apr 10 2019 *)
  • PARI
    is(n)=eulerphi(n)==eulerphi(n+1) \\ Charles R Greathouse IV, Feb 27 2014
    
  • PARI
    list(lim)=my(v=List(),old=1); forfactored(n=2,lim\1+1, my(new=eulerphi(n)); if(old==new, listput(v,n[1]-1)); old=new); Vec(v) \\ Charles R Greathouse IV, Jul 17 2022
    

Formula

Conjecture: a(n) ~ C*n^3*log(n), where C = 9/Pi^2 = 0.91189... - Thomas Ordowski, Oct 21 2014
Sum_{n>=1} 1/a(n) is in the interval (1.4324884, 7.8358) (Kinlaw et al., 2020; an upper bound 441702 was given by Bayless and Kinlaw, 2016). - Amiram Eldar, Oct 15 2020

Extensions

More terms from David W. Wilson

A001494 Numbers k such that phi(k) = phi(k+2).

Original entry on oeis.org

4, 7, 8, 10, 26, 32, 70, 74, 122, 146, 308, 314, 386, 512, 554, 572, 626, 635, 728, 794, 842, 910, 914, 1015, 1082, 1226, 1322, 1330, 1346, 1466, 1514, 1608, 1754, 1994, 2132, 2170, 2186, 2306, 2402, 2426, 2474, 2590, 2642, 2695, 2762, 2906, 3242, 3314
Offset: 1

Views

Author

Keywords

Comments

If p and 2p-1 are odd primes then 2*(2p-1) is a solution of the equation. Other terms (7,8,32,70,...) are not of this form.
There are 506764111 terms under 10^12. - Jud McCranie, Feb 13 2012
If 2^(2^m) + 1 is a Fermat prime in A019434, so, m = 0, 1, 2, 3, 4, then k = 2^(2^m + 1) is a term; this subsequence consists of {4, 8, 32, 512, 131072} and, in this case, phi(k) = phi(k+2) = 2^(2^m). - Bernard Schott, Apr 22 2022

References

  • D. M. Burton, Elementary Number Theory, section 7-2.
  • R. K. Guy, Unsolved Problems Number Theory, Sect. B36.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

Formula

A000010(a(n)) = A000010(a(n) + 2). - Reinhard Zumkeller, Feb 08 2013

Extensions

More terms from Jud McCranie, Dec 24 1999

A179186 Numbers k such that phi(k) = phi(k+4), with Euler's totient function phi = A000010.

Original entry on oeis.org

8, 14, 16, 20, 35, 52, 64, 91, 140, 148, 244, 292, 403, 455, 616, 628, 772, 801, 1011, 1024, 1108, 1144, 1252, 1270, 1295, 1456, 1588, 1684, 1820, 1828, 2030, 2164, 2452, 2623, 2644, 2660, 2692, 2932, 3028, 3216, 3321, 3508, 3988, 4264, 4340, 4372, 4612, 4804, 4852, 4948
Offset: 1

Views

Author

M. F. Hasler, Jan 05 2011

Keywords

Comments

Is there some k > 5 such that phi(k) = phi(k+3)?
None up to 500000. - Harvey P. Dale, Feb 16 2011
No further solutions to the phi(k) = phi(k+3) problem less than 10^12. On the other hand, this sequence has 267797240 terms under 10^12. - Jud McCranie, Feb 13 2012
No reason is known that would prevent other solutions of phi(k) = phi(k+3), see Graham, Holt, & Pomerance. - Jud McCranie, Jan 03 2013
If a(n) is even then a(n)/2 is in A001494 - see comment at A217139. - Jud McCranie, Dec 31 2012

References

  • S. W. Graham, J. J. Holt, and C. Pomerance, "On the solutions to phi(n)=phi(n+k)", Number Theory in Progress, Proc. Intern. Conf. in Honor of 60th Birthday of A. Schinzel, Poland, 1997. Walter de Gruyter, 1999, pp. 867-82.

Crossrefs

Programs

  • Magma
    [n: n in [1..5000] | EulerPhi(n) eq EulerPhi(n+4)]; // Vincenzo Librandi, Sep 08 2016
  • Mathematica
    Select[Range[5000],EulerPhi[#]==EulerPhi[#+4]&]  (* Harvey P. Dale, Feb 16 2011 *)
    SequencePosition[EulerPhi[Range[5000]],{x_,,,_,x_}][[;;,1]] (* Harvey P. Dale, Sep 12 2024 *)
  • PARI
    {op=vector(N=4); for( n=1,1e4,if( op[n%N+1]+0==op[n%N+1]=eulerphi(n),print1(n-N,",")))}
    

A179202 Numbers n such that phi(n) = phi(n+8), with Euler's totient function phi=A000010.

Original entry on oeis.org

13, 16, 19, 25, 28, 32, 40, 70, 104, 128, 175, 182, 209, 280, 296, 488, 551, 584, 657, 715, 806, 910, 1232, 1256, 1544, 1602, 2022, 2048, 2216, 2288, 2504, 2540, 2590, 2717, 2912, 3176, 3368, 3640, 3656, 4060, 4328, 4904, 5246, 5288, 5320, 5384, 5864, 5969
Offset: 1

Views

Author

M. F. Hasler, Jan 05 2011

Keywords

Comments

Among the 5596 terms below 10^7, a(6)=32 is the only term such that a(n+1) = a(n)+8.
There are 141741552 terms under 10^12. - Jud McCranie, Feb 13 2012
If a(n) is even then a(n)/2 is in A179186 - see comment at A217139. - Jud McCranie, Dec 31 2012

Crossrefs

Programs

  • Magma
    [n: n in [1..10000] | EulerPhi(n) eq EulerPhi(n+8)]; // Vincenzo Librandi, Sep 08 2016
  • Mathematica
    Select[Range[6000], EulerPhi[#] == EulerPhi[# + 8] &] (* Vincenzo Librandi, Sep 08 2016 *)
  • PARI
    {op=vector(N=8); for( n=1, 1e4, if( op[n%N+1]+0==op[n%N+1]=eulerphi(n), print1(n-N, ", ")))}
    

Formula

A000010(a(n)) = A000010(a(n)+8).

A217141 Numbers n such that phi(n) = phi(n+12) and n is not divisible by 2.

Original entry on oeis.org

143, 157, 203, 247, 273, 1147, 1209, 1679, 2147, 2279, 2375, 2445, 2705, 2747, 4331, 4687, 5049, 6107, 7367, 7835, 7869, 7979, 7991, 9167, 12127, 17145, 18501, 18753, 18981, 19803, 22987, 26733, 27359, 29097, 29987, 32829, 35485, 35763, 37653, 37851, 39907
Offset: 1

Views

Author

Michel Marcus, Sep 27 2012

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[1,40000,2],EulerPhi[#]==EulerPhi[#+12]&] (* Harvey P. Dale, Aug 22 2025 *)
  • PARI
    {op=vector(N=12); Nd6=N/6;for( n=1, 1e4, if( op[n%N+1]+0==op[n%N+1]=eulerphi(n), if ((n-N) % Nd6 != 0, print1(n-N, ", "))))}

Extensions

Definition clarified by Harvey P. Dale, Aug 22 2025

A276503 Numbers n such that phi(n) = phi(n+10), with Euler's totient function phi = A000010.

Original entry on oeis.org

20, 26, 35, 100, 130, 160, 370, 400, 610, 730, 793, 1000, 1570, 1843, 1930, 2500, 2560, 2770, 2860, 3130, 3970, 4000, 4171, 4210, 4570, 5410, 5767, 6130, 6400, 6610, 6730, 7330, 7570, 8770, 9106, 9640, 9970, 9991, 10498, 10660, 10930, 11248
Offset: 1

Views

Author

Vincenzo Librandi, Sep 08 2016

Keywords

Crossrefs

Cf. A000010.
Cf. numbers n such that phi(n)=phi(n+k): A001274 (k=1), A001494 (k=2), A179186 (k=4), A179187 (k=5), A179188 (k=6), A179189 (k=7), A179202 (k=8), this sequence (k=10), A276504 (k=11), A217139 (k=12).

Programs

  • Magma
    [n: n in [1..20000] | EulerPhi(n) eq EulerPhi(n+10)];
  • Mathematica
    Select[Range[15000], EulerPhi[#] == EulerPhi[# + 10] &]
    SequencePosition[EulerPhi[Range[12000]],{x_,,,_,,,_,,,_,x_}][[;;,1]] (* Harvey P. Dale, Apr 29 2025 *)

A217140 a(n) = m/n where m is the least number divisible by n such that phi(m) = phi(m+6n).

Original entry on oeis.org

24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 60, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36, 24, 24, 24, 24, 36
Offset: 1

Views

Author

Michel Marcus and Jonathan Sondow, Oct 01 2012

Keywords

Examples

			A179188(1)=24 is divisible by 1 and the quotient is 24, so a(1)=24.
A217139(1)=48 is divisible by 2 and the quotient is 24, so a(2)=24.
The first solution to phi(n)=phi(n+18) to be divisible by 3 is 72 and the quotient is 24, so a(3)=24.
		

Crossrefs

A217142 Least number m such that phi(m) = phi(m+6n) and m is not divisible by n.

Original entry on oeis.org

143, 52, 101, 124, 104, 123, 183, 156, 248, 144, 208, 267, 241, 365, 219, 248, 312, 306, 496, 369, 288, 432, 241, 543, 369, 468, 482, 386, 730, 444, 438, 432, 496, 1220, 624, 779, 612, 801, 915, 744, 723, 582, 576, 1095, 864, 488, 482, 641, 1086, 674, 738
Offset: 2

Views

Author

Michel Marcus, Sep 27 2012

Keywords

Crossrefs

Programs

  • PARI
    fpr(Nmax, lim) = {for (i=2, Nmax,N = i*6;op = vector(N);f = 0;for (n=1, lim, if (op[n%N+1]+0==op[n%N+1]=eulerphi(n), if ((n-N) % i != 0, f = n-N;break;);););print1(f, ", "););}

A330251 Numbers k such that phi(k) = phi(k+3), where phi (A000010) is Euler's totient function.

Original entry on oeis.org

3, 5, 8720288051472, 9134280520365, 41544070492925, 42466684755492, 51363581614342, 68616494581632, 113312918293575, 210911076210835, 215517565688425, 294988451482725, 383617980270525, 432759876053505, 442863123838135, 532068058516992, 892813363927485, 923102743748185, 929531173876305
Offset: 1

Views

Author

Michel Marcus and Giovanni Resta, Feb 29 2020

Keywords

Comments

10^15 < a(20) <= 1089641067389872.
Also terms: 1248817919303952, 1332436545865422, 1394926716616125, 1868522795664525, 1950445682260072.
a(4) and a(9) appear in Kevin Ford's paper.

Crossrefs

Programs

  • Mathematica
    Select[Range[100000], EulerPhi[#] == EulerPhi[# + 3] &] (* Alonso del Arte, Mar 01 2020 *)
  • PARI
    isok(k) = eulerphi(k) == eulerphi(k+3); \\ Michel Marcus, Feb 29 2020

A330429 Numbers k such that phi(k) = phi(k+9), where phi (A000010) is Euler's totient function.

Original entry on oeis.org

9, 15, 1005079920836, 13695542245376, 26160864154416, 27402841561095, 27599063056565, 110263115897935, 124632211478775, 127400054266476, 154090744843026, 205849483744896, 231019991767556, 339938754880725, 459718637643265, 632733228632505, 646552697065275, 683008674773416, 884965354448175
Offset: 1

Views

Author

Giovanni Resta, Mar 01 2020

Keywords

Comments

a(20) > 10^15.

Crossrefs

Showing 1-10 of 11 results. Next