cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A129827 Numbers k such that Euler's totient phi(k) divided by 2 is a perfect square.

Original entry on oeis.org

3, 4, 6, 15, 16, 19, 20, 24, 27, 30, 38, 51, 54, 64, 68, 73, 80, 91, 95, 96, 102, 111, 117, 120, 135, 146, 148, 152, 163, 182, 190, 216, 222, 228, 234, 243, 252, 255, 256, 270, 272, 275, 303, 320, 323, 326, 340, 365, 375, 384, 404, 408, 455, 459, 480, 486, 500
Offset: 1

Views

Author

Walter Nissen, May 20 2007

Keywords

Comments

Primes in this sequence are of the form 2*m^2+1 (see A090698). - Bernard Schott, Mar 07 2020
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

Examples

			a(4) is 15 because phi(15) = 8, which is twice the square of 2.
		

Crossrefs

Cf. A000010, A000290, A090698 (subsequence).

Programs

  • Mathematica
    Select[Range[500], IntegerQ @ Sqrt[EulerPhi[#]/2] &] (* Amiram Eldar, Mar 07 2020 *)
  • PARI
    isok(n) = issquare(eulerphi(n)/2) \\ Michel Marcus, Jul 23 2013
    
  • Python
    from sympy import totient
    from sympy.ntheory.primetest import is_square
    for i in range(3, 501):
        if is_square(int(totient(i)/2)):
            print(i, end=", ") # Waldemar Puszkarz, Oct 15 2024