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 16 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

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

Original entry on oeis.org

24, 34, 36, 39, 43, 44, 57, 72, 78, 82, 84, 93, 96, 108, 111, 146, 178, 201, 216, 222, 225, 226, 228, 306, 327, 364, 366, 381, 399, 417, 432, 438, 442, 466, 471, 482, 516, 527, 540, 543, 562, 576, 597, 610, 626, 633, 648, 706, 714, 732, 738, 802, 818, 866, 898, 912, 921, 924, 942, 948, 972, 1011
Offset: 1

Views

Author

M. F. Hasler, Jan 05 2011

Keywords

Comments

There are 1385502728 terms under 10^12. - Jud McCranie, Feb 13 2012

Crossrefs

Programs

Formula

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

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,",")))}
    

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

Original entry on oeis.org

5, 9, 15, 21, 15556, 21016, 25930, 25935, 27027, 36304, 46683, 129675, 266128, 307923, 329175, 430348, 503139, 636400, 684411, 812170, 1014778, 1252713, 1777545, 1871788, 1892452, 1911987, 2622160, 2629930, 2731360, 2947035, 3397480, 4200100, 5451537
Offset: 1

Views

Author

M. F. Hasler, Jan 05 2011

Keywords

Comments

There are only 43 terms below 10^7, and 1843 terms below 10^12. [Jud McCranie, Feb 13 2012]

Crossrefs

Programs

Formula

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

A066812 Numbers k such that phi(k+1) = phi(k-1).

Original entry on oeis.org

5, 8, 9, 11, 27, 33, 71, 75, 123, 147, 309, 315, 387, 513, 555, 573, 627, 636, 729, 795, 843, 911, 915, 1016, 1083, 1227, 1323, 1331, 1347, 1467, 1515, 1609, 1755, 1995, 2133, 2171, 2187, 2307, 2403, 2427, 2475, 2591, 2643, 2696, 2763, 2907, 3243, 3315
Offset: 1

Views

Author

Benoit Cloitre, Jan 20 2002

Keywords

Comments

a(n) is even for n = 2,18,24,44,67 while a(n) is odd for other values of n < 85.
a(n) is even for 63 out of the first 10^4 terms. - Amiram Eldar, May 07 2025

Crossrefs

Cf. A000010 (phi), A001494.

Programs

Formula

Conjecture: there is a constant 2 < c < 2.1 such that a(n)=n^c asymptotically.
a(n) = A001494(n) + 1.

Extensions

Corrected by Ralf Stephan, Feb 20 2004

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

Original entry on oeis.org

5, 7, 21, 45, 75, 105, 285, 488, 585, 765, 1148, 1275, 1358, 1785, 2528, 3465, 4088, 6825, 9405, 12375, 14348, 15345, 16208, 16988, 23648, 25905, 25935, 42698, 50018, 52845, 54615, 61448, 62865, 68445, 78195, 80025, 82005, 88328, 93555, 98475
Offset: 1

Views

Author

M. F. Hasler, Jan 05 2011

Keywords

Comments

There are 40 terms below 10^5, 81 terms below 10^6 and 162 terms below 10^7. There are 6606 terms below 10^12. [Jud McCranie, Feb 13 2012]
Farideh Firoozbakht asks whether there is some a(n+1) = a(n)+7, cf. link.
For n < 10^13, the only n such that phi(n-7) = phi(n) = phi(n+7) is 30057431145. - Giovanni Resta, Feb 27 2014

Crossrefs

Programs

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

Formula

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

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).

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 *)

A330703 Numbers k such that psi(k) = psi(k + 2) where psi(k) is the Dedekind psi function (A001615).

Original entry on oeis.org

6, 9, 12, 14, 18, 20, 33, 44, 62, 70, 92, 108, 116, 138, 164, 175, 212, 254, 280, 308, 320, 332, 348, 356, 452, 490, 524, 558, 572, 692, 716, 764, 833, 932, 956, 1004, 1105, 1124, 1172, 1188, 1436, 1496, 1562, 1593, 1676, 1724, 1772, 1964, 2002, 2036, 2088, 2132
Offset: 1

Views

Author

Amiram Eldar, Dec 26 2019

Keywords

Examples

			6 is in the sequence since psi(6) = psi(8) = 12.
		

Crossrefs

Programs

  • Mathematica
    psi[1] = 1; psi[n_] := n * Times @@ (1 + 1/Transpose[FactorInteger[n]][[1]]); Select[Range[10^3], psi[#] == psi[# + 2] &]

A333741 Odd numbers k such that phi(k) = phi(k+2), where phi is the Euler totient function (A000010).

Original entry on oeis.org

7, 635, 1015, 2695, 6497, 10307, 12317, 13445, 46205, 77693, 81303, 133787, 134995, 151823, 162925, 180633, 181427, 220113, 288925, 359905, 392819, 404471, 439097, 453167, 485237, 682649, 739023, 840851, 879303, 910195, 988713, 1392317, 1410119, 1434895, 1503347
Offset: 1

Views

Author

Amiram Eldar, Apr 03 2020

Keywords

Comments

The odd terms of A001494. These terms are relatively rare: of the first 10000 terms of A001494 only 63 are odd.

Examples

			7 is a term since phi(7) = phi(9) = 6.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 10^6, 2], EulerPhi[#] == EulerPhi[# + 2] &]
    2#-1&/@SequencePosition[EulerPhi[Range[1,151*10^4,2]],{x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 15 2020 *)
Showing 1-10 of 16 results. Next