login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that 2*phi(k)+k is a prime, where phi is A000010.
0

%I #28 Sep 12 2023 15:51:08

%S 1,3,5,7,11,13,15,23,33,35,37,43,47,53,61,67,69,71,77,87,95,103,113,

%T 119,123,127,133,137,143,159,163,167,177,181,191,193,209,211,217,249,

%U 251,257,259,263,267,271,277,293,299,307,313,329,331,335,337,339

%N Numbers k such that 2*phi(k)+k is a prime, where phi is A000010.

%C All the terms are odd squarefree numbers.

%t Select[Range[1, 350, 2], PrimeQ[2*EulerPhi[#] + #] &] (* _Amiram Eldar_, Aug 17 2023 *)

%o (Python)

%o from sympy import totient, isprime

%o print([k for k in range(1, 340) if isprime(2*totient(k) + k)])

%o (PARI) isok(k) = isprime(k+2*eulerphi(k)); \\ _Michel Marcus_, Aug 20 2023

%Y Cf. A000010, A068080.

%Y Subsequence of A056911.

%Y Subsequence: A088878 (the prime terms).

%K nonn,easy

%O 1,2

%A _DarĂ­o Clavijo_, Aug 17 2023