OFFSET
1,2
EXAMPLE
a(6) = 8 is a term because A340179(8) = 4 = 2^2.
MAPLE
f:= proc(n) local C, s, c;
C:=select(t -> igcd(t, n) = 1, [$1..n-1]);
s:= convert(C, `+`);
add(s mod c, c = C)
end proc:
select(t -> issqr(f(t)), [$1..7000]);
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Feb 04 2021
STATUS
approved