OFFSET
1,5
COMMENTS
Up to n = 10000 a(n) is divisible by 4 except for the values 1 and 9 (a(27)).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
From Robert Israel, Apr 01 2021: (Start)
a(n) = 0 if n is in A024619, or if n = p^d with p > 3 prime and d >= 3, or if n = 2^d with d >= 5, or if n = 3^d with d >= 4.
a(p) = a(p^2) = 1 if p is in A002145.
a(p) = p-1 and a(p^2) = p^2-1 if p is in A002144.
(End)
MAPLE
PROG
(PARI) a(n) = if (n==1, 0, lift(vecprod(Set(select(x->(issquare(x) && (x!=0)), vector(n-1, k, Mod(k, n))))))); \\ Michel Marcus, Apr 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Schellenberg, Nov 20 2013
STATUS
approved