login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A001494 Numbers k such that phi(k) = phi(k+2).
(Formerly M3293 N1328)
17

%I M3293 N1328 #98 Feb 16 2024 01:20:07

%S 4,7,8,10,26,32,70,74,122,146,308,314,386,512,554,572,626,635,728,794,

%T 842,910,914,1015,1082,1226,1322,1330,1346,1466,1514,1608,1754,1994,

%U 2132,2170,2186,2306,2402,2426,2474,2590,2642,2695,2762,2906,3242,3314

%N Numbers k such that phi(k) = phi(k+2).

%C 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 There are 506764111 terms under 10^12. - _Jud McCranie_, Feb 13 2012

%C 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 D. M. Burton, Elementary Number Theory, section 7-2.

%D R. K. Guy, Unsolved Problems Number Theory, Sect. B36.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H 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 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 M. F. Hasler, <a href="/A001494/a001494.txt">Table of n, a(n) for n = 1..17286</a>. (Terms up to 10^7.)

%H 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 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 A000010(a(n)) = A000010(a(n) + 2). - _Reinhard Zumkeller_, Feb 08 2013

%t Select[Range[3500], EulerPhi[#]==EulerPhi[#+2]&] (* _Harvey P. Dale_, Apr 24 2011 *)

%t 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 SequencePosition[EulerPhi[Range[4300]],{x_,_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 04 2020 *)

%o (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 (Haskell)

%o import Data.List (elemIndices)

%o a001494 n = a001494_list !! (n-1)

%o a001494_list = map (+ 1) $ elemIndices 0 $

%o zipWith (-) (drop 2 a000010_list) a000010_list

%o -- _Reinhard Zumkeller_, Feb 08 2013

%o (Magma) [n: n in [1..4000] | EulerPhi(n) eq EulerPhi(n+2)]; // _Vincenzo Librandi_, Sep 07 2016

%Y Cf. A000010, A001274, A007015, A179186, A179187, A179188, A179189, A179202, A217139.

%K nonn,nice

%O 1,1

%A _N. J. A. Sloane_

%E More terms from _Jud McCranie_, Dec 24 1999

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 15:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)