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

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

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

Original entry on oeis.org

48, 68, 72, 78, 86, 88, 114, 143, 144, 156, 157, 164, 168, 186, 192, 203, 216, 222, 247, 273, 292, 356, 402, 432, 444, 450, 452, 456, 612, 654, 728, 732, 762, 798, 834, 864, 876, 884, 932, 942, 964, 1032, 1054, 1080, 1086, 1124, 1147, 1152, 1194, 1209, 1220
Offset: 1

Views

Author

Michel Marcus, Sep 27 2012

Keywords

Comments

Most of numbers n in this sequence are divisible by 2, and it appears that n/2 belongs to A179188. The other ones are listed in sequence A217141.
Proof of the comment: If n is even and not a multiple of 4 then phi(n)=phi(n/2). If n is a multiple of 4 then phi(n)=2 * phi(n/2). So when k is a multiple of 4 and phi(n)=phi(n+k), then phi(n/2)=phi(n/2+k/2). QED. This also applies to A179186, A179202. - Jud McCranie, Dec 30 2012

Crossrefs

Programs

  • Magma
    [n: n in [1..3000] | EulerPhi(n) eq EulerPhi(n+12)]; // Vincenzo Librandi, Sep 08 2016
  • Mathematica
    Select[Range[1, 5000], EulerPhi[#] == EulerPhi[# + 12] &] (* Vincenzo Librandi, Jun 24 2014 *)
  • PARI
    {op=vector(N=12); 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).

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

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

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
Showing 1-10 of 11 results. Next