OFFSET
1,2
EXAMPLE
Since phi(54) = 18 = (5 * 3^2 - 3 * 3) / 2, a heptagonal number, 54 is a term of this sequence.
MATHEMATICA
Select[Range[5000], IntegerQ[(3 + Sqrt[9 + 40 EulerPhi[#]])/10] &]
PROG
(PARI) isok(m) = ispolygonal(eulerphi(m), 7); \\ Michel Marcus, Sep 09 2025
(Python)
from math import isqrt
from sympy import totient as phi
ok = lambda n: (d:=9+40*phi(n)) == (s:=isqrt(d))**2 and (3+s)%10==0
print([m for m in range(1, 5000) if ok(m)]) # Aidan Chen, Sep 19 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Aidan Chen, Sep 07 2025
STATUS
approved
