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 A137401 #16 Jun 07 2017 00:35:17 %S A137401 0,0,2,7,12,20,0,63,116,72,90,131,0,108,182,339,240,602,324,415,326, %T A137401 420,462,839,604,216,1808,763,756,812,810,1735,992,1056,1092,3311,648, %U A137401 1620,650,2511,1560,1640,1134,2227,4328,1980,2070,3683,2484,2644,2450,1519 %N A137401 a(n) is the number of ordered solutions (x,y,z) to x^3 + y^3 == z^3 mod n with 1 <= x,y,z <= n-1. %C A137401 Record values of A137401: 0, 2, 7, 12, 20, 63, 116, 131, 182, 339, 602, 839, 1808, 3311, 4328, 7964, 8864, 9231, 19583, 21986, 41363, 52676, 81467, 87596, 92087, 112616, 236951, 247940, 378071, 386423, 521135, ... - _Robert G. Wilson v_ %H A137401 Chai Wah Wu, <a href="/A137401/b137401.txt">Table of n, a(n) for n = 1..10000</a> (terms n = 1..425 from Robert G. Wilson v) %F A137401 a(n) = A063454(n)-3*A087786(n)+3*A000189(n)-1. - _Vladeta Jovovic_, Apr 11 2008 %e A137401 a(4)=7 because (1, 2, 1), (1, 3, 2), (2, 1, 1), (2, 2, 2), (2, 3, 3), (3, 1, 2), (3, 2, 3) are solutions for n=4. %t A137401 f[n_] := Block[ {c = 0}, Do[ If[ Mod[x^3 + y^3, n] == Mod[z^3, n], c++ ], {x, n - 1}, {y, n - 1}, {z, n - 1}]; c]; %t A137401 Table[Length[Select[Tuples[Range[n - 1], 3], Mod[ #[[1]]^3 + #[[2]]^3 - #[[3]]^3, n] == 0 &]], {n, 2, 50}] (* _Stefan Steinerberger_, Apr 12 2008 *) %o A137401 (Python) %o A137401 def A137401(n): %o A137401 ndict = {} %o A137401 for i in range(1,n): %o A137401 m = pow(i,3,n) %o A137401 if m in ndict: %o A137401 ndict[m] += 1 %o A137401 else: %o A137401 ndict[m] = 1 %o A137401 count = 0 %o A137401 for i in ndict: %o A137401 ni = ndict[i] %o A137401 for j in ndict: %o A137401 k = (i+j) % n %o A137401 if k in ndict: %o A137401 count += ni*ndict[j]*ndict[k] %o A137401 return count # _Chai Wah Wu_, Jun 06 2017 %Y A137401 Cf. A063454. %K A137401 nonn %O A137401 1,3 %A A137401 Neven Juric (neven.juric(AT)apis-it.hr), Apr 11 2008 %E A137401 More terms from _Stefan Steinerberger_ and _Robert G. Wilson v_, Apr 12 2008