OFFSET
1,2
COMMENTS
Equivalently, the number of solutions to x^3 + y^3 + z^3 == 0 (mod n). - Andrew Howroyd, Jul 18 2018
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms n = 1..1000 from Seiichi Manyama)
PROG
(PARI) a(n)={my(p=Mod(sum(i=0, n-1, x^(i^3%n)), 1-x^n)); polcoeff(lift(p^3), 0)} \\ Andrew Howroyd, Jul 18 2018
(Python)
def A063454(n):
ndict = {}
for i in range(n):
m = pow(i, 3, n)
if m in ndict:
ndict[m] += 1
else:
ndict[m] = 1
count = 0
for i in ndict:
ni = ndict[i]
for j in ndict:
k = (i+j) % n
if k in ndict:
count += ni*ndict[j]*ndict[k]
return count # Chai Wah Wu, Jun 06 2017
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 25 2001
EXTENSIONS
More terms from Dean Hickerson, Jul 26, 2001
STATUS
approved