login
Numbers k such that k^2 - phi(k) is prime, where phi() is A000010.
4

%I #30 Sep 08 2022 08:46:13

%S 2,3,7,13,33,35,65,67,77,79,91,133,139,151,163,193,221,247,249,287,

%T 299,321,337,341,349,377,379,437,457,481,533,541,551,561,581,591,595,

%U 611,613,643,721,727,763,769,779,789,803,817,843,851,869,917,919,991

%N Numbers k such that k^2 - phi(k) is prime, where phi() is A000010.

%C Conjecture: a(n) is a cyclic number (see A003277) for all n.

%C A065508 is the subsequence of prime terms. - _Michel Marcus_, Jun 19 2015

%H Amiram Eldar, <a href="/A259145/b259145.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 2, since phi(2) = 1, thus 2^2 - 1 = 3 (prime).

%e a(3) = 7, since phi(7) = 6, thus 7^2 - 6 = 43 (prime).

%e a(5) = 33, since phi(33) = 20, thus 33^2 - 20 = 1069 (prime).

%t Select[Range[2000], PrimeQ[#^2 - EulerPhi[#]] &]

%o (Magma) [n: n in [1..1000] | IsPrime(n^2 - EulerPhi(n))]; // _Vincenzo Librandi_, Jun 21 2015

%o (PARI) main(size)={ v=vector(size); i=0; m=1; while(i<size, if(isprime(m^2-eulerphi(m)),v[i++]=m);m++;); return(v);} /* _Anders Hellström_, Jul 08 2015 */

%Y Cf. A000010, A003277, A065508, A258435.

%K nonn,easy

%O 1,1

%A _Carlos Eduardo Olivieri_, Jun 19 2015