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.

A087412 a(n) is the number of solutions to x^3 + y^3 == 1 (mod n).

This page as a plain text file.
%I A087412 #30 Sep 17 2019 12:03:03
%S A087412 1,2,3,4,5,6,6,8,18,10,11,12,6,12,15,16,17,36,24,20,18,22,23,24,25,12,
%T A087412 54,24,29,30,33,32,33,34,30,72,24,48,18,40,41,36,33,44,90,46,47,48,42,
%U A087412 50,51,24,53,108,55,48,72,58,59,60
%N A087412 a(n) is the number of solutions to x^3 + y^3 == 1 (mod n).
%H A087412 Andrew Howroyd, <a href="/A087412/b087412.txt">Table of n, a(n) for n = 1..10000</a>
%F A087412 From _Andrew Howroyd_, Jul 17 2018: (Start)
%F A087412 a(p^e) = p^e for p prime and p mod 3 = 2.
%F A087412 Conjecture: a(3^e) = 2*3^e for e > 1.
%F A087412 a(p^e) = p^(e-1)*(p - 1 + Sum_{b=1..p-1} Legendre(12*b^(-1) - 3*b^2, p)) for p prime and p <> 3.
%F A087412 The final formula arises from factoring x^3 + y^3 as (x + y)*(x*2 - x*y + y^2), then substituting b = x + y and counting the solutions to the resulting quadratic equation 3*x^2 - 3*b*x + b^2 == b^(-1) (mod p) for each nonzero value of b. (End)
%t A087412 a[n_] := Module[{v = Table[0, {n}]}, For[i = 0, i <= n-1, i++, v[[Mod[i^3, n] + 1]]++]; Sum[v[[i+1]] v[[Mod[1-i, n] + 1]], {i, 0, n-1}]];
%t A087412 a /@ Range[1, 60] (* _Jean-François Alcover_, Sep 17 2019, after _Andrew Howroyd_ *)
%o A087412 (PARI) a(n) = {nb = 0; for (x = 0, n-1, for (y = 0, n-1, if (Mod(x^3,n) + Mod(y^3,n) == Mod(1, n), nb++););); nb;} \\ _Michel Marcus_, Aug 06 2013
%o A087412 (PARI) a(n)={my(v=vector(n)); for(i=0, n-1, v[i^3%n + 1]++); sum(i=0, n-1, v[i+1]*v[(1-i)%n + 1])} \\ _Andrew Howroyd_, Jul 17 2018
%Y A087412 Cf. A087786.
%K A087412 mult,nonn
%O A087412 1,2
%A A087412 Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 21 2003
%E A087412 More terms from _Michel Marcus_, Aug 06 2013