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 A323704 #30 Feb 02 2025 12:01:14 %S A323704 2,3,5,3,11,5,17,7,23,29,11,13,41,15,47,53,59,21,23,71,25,27,83,89,33, %T A323704 101,35,107,37,113,43,131,137,47,149,51,53,55,167,173,179,61,191,65, %U A323704 197,67,71,75,227,77,233,239,81,251,257,263,269,91,93,281,95,293 %N A323704 Number of cubic residues (including 0) modulo the n-th prime. %H A323704 Harvey P. Dale, <a href="/A323704/b323704.txt">Table of n, a(n) for n = 1..1000</a> %F A323704 If prime(n) - 1 = 3k then a(n) = k+1, otherwise a(n) = prime(n). (Cf. formula for A236959.) %F A323704 a(n) = A236959(n) + 1. %F A323704 a(n) = A046530(A000040(n)). - _Rémy Sigrist_, Jan 24 2019 %t A323704 Table[With[{p=Prime[n]},If[Mod[p,3]==1,1+(p-1)/3,p]],{n,80}] (* _Harvey P. Dale_, Feb 02 2025 *) %o A323704 (Python) %o A323704 from sympy import prime %o A323704 def a(n): %o A323704 p = prime(n) %o A323704 return len(set([x**3 % p for x in range(p)])) %o A323704 (PARI) a(n) = my(p=prime(n)); sum(k=0, p-1, ispower(Mod(k,p), 3)); \\ _Michel Marcus_, Feb 26 2019 %Y A323704 Cf. A046530, A000040, A236959. %K A323704 nonn %O A323704 1,1 %A A323704 _Florian Severin_, Jan 24 2019