OFFSET
1,1
COMMENTS
k is a term iff k = 2^e or k = 3^e*Product_{i=1..s} p_i^e_i, p_i == 2 (mod 3) and e >= 1. If k = 2^e, A053818(k) == (1/2)*k (mod k); if k = 3^e*Product_{i=1..s} p_i^e_i, A053818(k) == (2/3)*k for even s and (1/3)*k for odd s. - Corrected by Robert Israel, Nov 15 2020
Terms < N are getting more and more sparse as N increases. The number of terms below 100, 1000, 10000 and 100000 are 31, 187, 1431 and 12059, respectively.
LINKS
Jianing Song, Table of n, a(n) for n = 1..12059 (all terms below 100000)
EXAMPLE
MATHEMATICA
Select[Range@ 250, Function[n, Mod[Total[Select[Range@ n, GCD[#, n] == 1 &]^2], n] != 0]] (* Michael De Vlieger, Jul 19 2018 *)
PROG
(PARI) pr(n)=my(f=factor(n)[, 1]); prod(i=1, #f, abs(f[i]%3-1));
for(n=2, 1000, if(omega(2*n)==1, print1(n, ", "), if(n%3==0&&pr(n), print1(n, ", "))))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Jul 15 2018
STATUS
approved