Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #33 Nov 02 2024 00:16:06
%S 3,4,6,15,16,19,20,24,27,30,38,51,54,64,68,73,80,91,95,96,102,111,117,
%T 120,135,146,148,152,163,182,190,216,222,228,234,243,252,255,256,270,
%U 272,275,303,320,323,326,340,365,375,384,404,408,455,459,480,486,500
%N Numbers k such that Euler's totient phi(k) divided by 2 is a perfect square.
%C Primes in this sequence are of the form 2*m^2+1 (see A090698). - _Bernard Schott_, Mar 07 2020
%C If k is an odd term, so is 2*k. If k is an even term, so is 4*k. - _Waldemar Puszkarz_, Oct 15 2024
%H Amiram Eldar, <a href="/A129827/b129827.txt">Table of n, a(n) for n = 1..10000</a>
%e a(4) is 15 because phi(15) = 8, which is twice the square of 2.
%t Select[Range[500], IntegerQ @ Sqrt[EulerPhi[#]/2] &] (* _Amiram Eldar_, Mar 07 2020 *)
%o (PARI) isok(n) = issquare(eulerphi(n)/2) \\ _Michel Marcus_, Jul 23 2013
%o (Python)
%o from sympy import totient
%o from sympy.ntheory.primetest import is_square
%o for i in range(3, 501):
%o if is_square(int(totient(i)/2)):
%o print(i, end=", ") # _Waldemar Puszkarz_, Oct 15 2024
%Y Cf. A000010, A000290, A090698 (subsequence).
%K nonn
%O 1,1
%A _Walter Nissen_, May 20 2007