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.
%I A001494 M3293 N1328 #98 Feb 16 2024 01:20:07 %S A001494 4,7,8,10,26,32,70,74,122,146,308,314,386,512,554,572,626,635,728,794, %T A001494 842,910,914,1015,1082,1226,1322,1330,1346,1466,1514,1608,1754,1994, %U A001494 2132,2170,2186,2306,2402,2426,2474,2590,2642,2695,2762,2906,3242,3314 %N A001494 Numbers k such that phi(k) = phi(k+2). %C A001494 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. %C A001494 There are 506764111 terms under 10^12. - _Jud McCranie_, Feb 13 2012 %C A001494 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 %D A001494 D. M. Burton, Elementary Number Theory, section 7-2. %D A001494 R. K. Guy, Unsolved Problems Number Theory, Sect. B36. %D A001494 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001494 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001494 Jud McCranie, <a href="/A001494/b001494.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe) %H A001494 Kevin Ford, <a href="https://arxiv.org/abs/2002.12155">Solutions of phi(n)=phi(n+k) and sigma(n)=sigma(n+k)</a>, arXiv:2002.12155 [math.NT], 2020. %H A001494 M. F. Hasler, <a href="/A001494/a001494.txt">Table of n, a(n) for n = 1..17286</a>. (Terms up to 10^7.) %H A001494 V. L. Klee, Jr., <a href="http://www.jstor.org/stable/2305207">Some remarks on Euler's totient function</a>, Amer. Math. Monthly, 54 (1947), 332. %H A001494 Leo Moser, <a href="http://www.jstor.org/stable/2305815">Some equations involving Euler's totient function</a>, Amer. Math. Monthly, 56 (1949), 22-23. %F A001494 A000010(a(n)) = A000010(a(n) + 2). - _Reinhard Zumkeller_, Feb 08 2013 %t A001494 Select[Range[3500], EulerPhi[#]==EulerPhi[#+2]&] (* _Harvey P. Dale_, Apr 24 2011 *) %t A001494 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 *) %t A001494 SequencePosition[EulerPhi[Range[4300]],{x_,_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 04 2020 *) %o A001494 (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 %o A001494 (Haskell) %o A001494 import Data.List (elemIndices) %o A001494 a001494 n = a001494_list !! (n-1) %o A001494 a001494_list = map (+ 1) $ elemIndices 0 $ %o A001494 zipWith (-) (drop 2 a000010_list) a000010_list %o A001494 -- _Reinhard Zumkeller_, Feb 08 2013 %o A001494 (Magma) [n: n in [1..4000] | EulerPhi(n) eq EulerPhi(n+2)]; // _Vincenzo Librandi_, Sep 07 2016 %Y A001494 Cf. A000010, A001274, A007015, A179186, A179187, A179188, A179189, A179202, A217139. %K A001494 nonn,nice %O A001494 1,1 %A A001494 _N. J. A. Sloane_ %E A001494 More terms from _Jud McCranie_, Dec 24 1999