cp's OEIS Frontend

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.

A276920 Number of solutions to x^3 + y^3 + z^3 + t^3 == 0 (mod n) for 1 <= x, y, z, t <= n.

This page as a plain text file.
%I A276920 #29 Jun 07 2017 00:35:43
%S A276920 1,8,27,72,125,216,595,704,1539,1000,1331,1944,3133,4760,3375,5632,
%T A276920 4913,12312,8911,9000,16065,10648,12167,19008,16125,25064,45927,42840,
%U A276920 24389,27000,35371,47104,35937,39304,74375,110808,58645,71288,84591,88000
%N A276920 Number of solutions to x^3 + y^3 + z^3 + t^3 == 0 (mod n) for 1 <= x, y, z, t <= n.
%C A276920 a(n) = n^3 if n is in A074243. - _Robert Israel_, Oct 13 2016
%H A276920 Chai Wah Wu, <a href="/A276920/b276920.txt">Table of n, a(n) for n = 1..10000</a> (terms n = 1..242 from Robert Israel)
%e A276920 For n = 3, we see that all nondecreasing solutions {x, y, z, t} are in {{1, 1, 1, 3}, {1, 1, 2, 2}, {1, 2, 3, 3}, {2, 2, 2, 3}, {3, 3, 3, 3}}. The numbers in the sets can be ordered in 4, 6, 12, 4 and 1 ways respectively. Therefore, a(3) = 4 + 6 + 12 + 4 + 1 = 27. - _David A. Corneth_, Oct 11 2016
%p A276920 CF:= table([[false, false, true] = 12, [true, false, false] = 12, [true, false, true] = 6, [false, false, false] = 24, [true, true, true] = 1, [false, true, true] = 4, [false, true, false] = 12, [true, true, false] = 4]):
%p A276920 f1:= proc(n)
%p A276920   option remember;
%p A276920   local count, t, x,y,z,signature;
%p A276920   if isprime(n) and n mod 3 = 2 then return n^3 fi;
%p A276920   count:= 0;
%p A276920   for t from 1 to n do
%p A276920     for x from 1 to t do
%p A276920       for y from 1 to x do
%p A276920         for z from 1 to y do
%p A276920           if t^3 + x^3 + y^3 + z^3 mod n = 0 then
%p A276920             signature:= map(evalb,[z=y,y=x,x=t]);
%p A276920             count:= count + CF[signature];
%p A276920           fi
%p A276920   od od od od;
%p A276920   count
%p A276920 end proc:
%p A276920 f:= proc(n) local t;
%p A276920     mul(f1(t[1]^t[2]),t=ifactors(n)[2])
%p A276920 end proc:
%p A276920 map(f, [$1..40]); # _Robert Israel_, Oct 13 2016
%t A276920 JJJ[4, n, lam] = Sum[If[Mod[a^3 + b^3 + c^3 + d^3, n] == Mod[lam, n], 1, 0], {d, 0, n - 1}, {a, 0, n - 1}, {b, 0, n - 1}, {c, 0 , n - 1}]; Table[JJJ[4, n, 0], {n, 1, 50}]
%o A276920 (PARI) a(n) = sum(x=1, n, sum(y=1, n, sum(z=1, n, sum(t=1, n, Mod(x,n)^3 + Mod(y,n)^3 + Mod(z,n)^3 + Mod(t,n)^3 == 0)))); \\ _Michel Marcus_, Oct 11 2016
%o A276920 (PARI) qperms(v) = {my(r=1,t); v = vecsort(v); for(i=1,#v-1, if(v[i]==v[i+1], t++, r*=binomial(i, t+1);t=0));r*=binomial(#v,t+1)}
%o A276920 a(n) = {my(t=0); forvec(v=vector(4,i,[1,n]), if(sum(i=1,4,Mod(v[i],n)^3)==0, t+=qperms(v)),1);t} \\ _David A. Corneth_, Oct 11 2016
%o A276920 (Python)
%o A276920 def A276920(n):
%o A276920     ndict = {}
%o A276920     for i in range(n):
%o A276920         i3 = pow(i,3,n)
%o A276920         for j in range(i+1):
%o A276920             j3 = pow(j,3,n)
%o A276920             m = (i3+j3) % n
%o A276920             if m in ndict:
%o A276920                 if i == j:
%o A276920                     ndict[m] += 1
%o A276920                 else:
%o A276920                     ndict[m] += 2
%o A276920             else:
%o A276920                 if i == j:
%o A276920                     ndict[m] = 1
%o A276920                 else:
%o A276920                     ndict[m] = 2
%o A276920     count = 0
%o A276920     for i in ndict:
%o A276920         j = (-i) % n
%o A276920         if j in ndict:
%o A276920             count += ndict[i]*ndict[j]
%o A276920     return count # _Chai Wah Wu_, Jun 06 2017
%Y A276920 Cf. A000189, A047726, A060839, A063454, A074243, A087412, A087786, A254073, A276919.
%K A276920 nonn,mult
%O A276920 1,2
%A A276920 _José María Grau Ribas_, Sep 22 2016