This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A254073 #27 Jul 18 2018 02:18:57 %S A254073 1,4,9,16,25,36,90,64,162,100,121,144,252,360,225,256,289,648,468,400, %T A254073 810,484,529,576,625,1008,1458,1440,841,900,1143,1024,1089,1156,2250, %U A254073 2592,1602,1872,2268,1600,1681,3240,2115,1936,4050,2116,2209,2304,4410 %N A254073 Number of solutions to x^3 + y^3 + z^3 == 1 (mod n) for 1 <= x, y, z <= n. %C A254073 It appears that a(n) = n^2 for n in A088232 (numbers n such that 3 does not divide phi(n)) and that a(n) != n^2 for n in A066498 (numbers n such that 3 divides phi(n)). - _Michel Marcus_, Mar 13 2015 %C A254073 It appears that a(p) != p^2 for primes in A002476 (primes of form 6m + 1). - _Michel Marcus_, Mar 13 2015 %H A254073 Chai Wah Wu, <a href="/A254073/b254073.txt">Table of n, a(n) for n = 1..10000</a> %t A254073 a[n_] := Sum[ If[ Mod[x^3 + y^3 + z^3, n] == 1, 1, 0], {x, n}, {y, n}, {z, n}]; a[1]=1; Table[a[n], {n, 2,22}] %o A254073 (PARI) a(n) = {nb = 0; for (x=1, n, for (y=1, n, for (z=1, n, if ((Mod(x^3,n) + Mod(y^3,n) + Mod(z^3,n)) % n == Mod(1, n), nb ++);););); nb;} \\ _Michel Marcus_, Mar 11 2015 %o A254073 (PARI) a(n)={my(p=Mod(sum(i=0, n-1, x^(i^3%n)), 1-x^n)^3); polcoeff(lift(p), 1%n)} \\ _Andrew Howroyd_, Jul 18 2018 %o A254073 (Python) %o A254073 def A254073(n): %o A254073 ndict = {} %o A254073 for i in range(n): %o A254073 m = pow(i,3,n) %o A254073 if m in ndict: %o A254073 ndict[m] += 1 %o A254073 else: %o A254073 ndict[m] = 1 %o A254073 count = 0 %o A254073 for i in ndict: %o A254073 ni = ndict[i] %o A254073 for j in ndict: %o A254073 k = (1-i-j) % n %o A254073 if k in ndict: %o A254073 count += ni*ndict[j]*ndict[k] %o A254073 return count # _Chai Wah Wu_, Jun 06 2017 %Y A254073 Cf. A087412. %K A254073 nonn,mult %O A254073 1,2 %A A254073 _José María Grau Ribas_, Jan 25 2015