A001494 Numbers k such that phi(k) = phi(k+2).
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
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).
Links
- Jud McCranie, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
- Kevin Ford, Solutions of phi(n)=phi(n+k) and sigma(n)=sigma(n+k), arXiv:2002.12155 [math.NT], 2020.
- M. F. Hasler, Table of n, a(n) for n = 1..17286. (Terms up to 10^7.)
- V. L. Klee, Jr., Some remarks on Euler's totient function, Amer. Math. Monthly, 54 (1947), 332.
- Leo Moser, Some equations involving Euler's totient function, Amer. Math. Monthly, 56 (1949), 22-23.
Programs
-
Haskell
import Data.List (elemIndices) a001494 n = a001494_list !! (n-1) a001494_list = map (+ 1) $ elemIndices 0 $ zipWith (-) (drop 2 a000010_list) a000010_list -- Reinhard Zumkeller, Feb 08 2013
-
Magma
[n: n in [1..4000] | EulerPhi(n) eq EulerPhi(n+2)]; // Vincenzo Librandi, Sep 07 2016
-
Mathematica
Select[Range[3500], EulerPhi[#]==EulerPhi[#+2]&] (* Harvey P. Dale, Apr 24 2011 *) Flatten[Position[Partition[EulerPhi[Range[3500]],3,1],?(#[[1]]==#[[3]]&),{1},Heads->False]] (* This program is more efficient than the first program above because it only has to calculate phi of each number once. *) (* _Harvey P. Dale, Aug 20 2014 *) SequencePosition[EulerPhi[Range[4300]],{x_,,x}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 04 2020 *)
-
PARI
op=[0,c=0]; for( n=1,1e7,if( op[bittest(n,0)+1]+0==op[bittest(n,0)+1]=eulerphi(n), write("b001494.txt",c++," "n-2))) \\ M. F. Hasler, Jan 05 2011
Formula
Extensions
More terms from Jud McCranie, Dec 24 1999
Comments