A055458 a(n) = smallest composite solution x to the equation phi(x+2n) = phi(x)+2n.
6, 12, 21, 24, 36, 45, 48, 39, 63, 72, 72, 95, 60, 57, 224, 84, 15, 135, 1058, 45, 301, 144
Offset: 1
Examples
a(19) = 1058 because phi(1058 + 38) = phi(1096) = 544 = 506 + 38 = phi(1058) + 38. a(100) = 225, phi(225 + 200) = phi(425) = 320 = 120 + 200 = phi(225) + 200.
References
- Sivaramakrishnan, R. (1989): Classical theory of Arithmetical Functions. Marcel Dekker, Inc., New York-Basel. Chapter V, Problem 20, page 113.
Programs
-
Maple
A055458 := proc(n) local x; for x from 0 do if not isprime(x) then if numtheory[phi](x+2*n) = numtheory[phi](x)+2*n then return x; end if; end if; end do: end proc: # R. J. Mathar, Sep 23 2016
-
Mathematica
Table[k = 4; While[Nand[CompositeQ@ k, EulerPhi[k + 2 n] == EulerPhi[k] + 2 n], k++]; k, {n, 22}] (* Michael De Vlieger, Dec 17 2016 *)
-
PARI
a(n)=forcomposite(x=4,, if(eulerphi(x+2*n) == eulerphi(x)+2*n, return(x))) \\ does not handle -1s; Charles R Greathouse IV, Apr 28 2015
Extensions
More terms from Michel ten Voorde Jun 14 2003
Entry revised by N. J. A. Sloane, Apr 28 2015
Comments