login
A384996
Numbers m such that phi(m) is a hexagonal number.
3
1, 2, 7, 9, 14, 18, 29, 58, 67, 134, 143, 155, 175, 183, 191, 225, 231, 244, 248, 277, 286, 308, 310, 329, 350, 366, 372, 379, 382, 396, 417, 423, 450, 462, 554, 556, 631, 658, 758, 834, 846, 869, 917, 947, 1129, 1179, 1262, 1327, 1415, 1633, 1738, 1834, 1894, 2017, 2117, 2147, 2159, 2258, 2264, 2358, 2359
OFFSET
1,2
LINKS
EXAMPLE
Since phi(67) = 66 = 6*(2*6-1), a hexagonal number, 67 is a term of this sequence.
MAPLE
ishex:= proc(y) issqr(1+8*y) and sqrt(1+8*y) mod 4 = 3 end proc:
select(t -> ishex(NumberTheory:-phi(t)), [$1..2000]); # Robert Israel, Dec 23 2025
MATHEMATICA
Select[Range[2500], IntegerQ[(1 + Sqrt[1 + 8 EulerPhi[#]])/4] &]
PROG
(PARI) isok(m) = ispolygonal(eulerphi(m), 6); \\ Michel Marcus, Sep 09 2025
(Python)
from math import isqrt
from sympy import totient as phi
ok = lambda n: (d:=1+8*phi(n)) == (s:=isqrt(d))**2 and (1+s)%4==0
print([m for m in range(1, 2500) if ok(m)]) # Aidan Chen, Sep 19 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Aidan Chen, Sep 07 2025
STATUS
approved