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.

A132385 Number of distinct primes among the cubes mod n.

This page as a plain text file.
%I A132385 #13 Jun 28 2018 02:44:35
%S A132385 0,0,1,1,2,3,0,3,0,4,4,4,1,2,6,5,6,1,2,7,2,8,8,8,8,2,2,2,9,10,3,10,11,
%T A132385 11,3,2,4,5,3,11,12,4,3,13,3,14,14,14,4,14,15,4,15,4,16,5,5,16,16,16,
%U A132385 6,6,0,17,5,18,5,18,19,5
%N A132385 Number of distinct primes among the cubes mod n.
%C A132385 This is to cubes A000578 as A132213 is to squares A000290.
%C A132385 It seems that the size of a(n) as compared to its surrounding elements is dependent on whether or not n is in A088232. If n is in A088232 the sequence assumes "big" values, otherwise the values will be "small". - _Stefan Steinerberger_, Nov 24 2007
%C A132385 If n is in A088232, a(n) = A000720(n-1) - A056170(n). - _Robert Israel_, Jun 28 2018
%H A132385 Robert Israel, <a href="/A132385/b132385.txt">Table of n, a(n) for n = 1..10000</a>
%F A132385 a(n) = Card{p = k^3 mod n, for primes p and for all integers k}.
%e A132385 a(10) = 4 because the cubes mod 10 repeat 0, 1, 8, 7, 4, 5, 6, 3, 2, 9, 0, 1, 8, 7, 4, 5, ... of which the 4 distinct primes are {2, 3, 5, 7}.
%p A132385 f:= proc(n)
%p A132385   if numtheory:-phi(n) mod 3 = 0 then nops(select(isprime, {seq(i^3 mod n, i=0..n-1)}))
%p A132385   else numtheory:-pi(n-1) - nops(select(t -> t[2]>1, ifactors(n)[2]))
%p A132385   fi
%p A132385 end proc:
%p A132385 map(f, [$1..100]); # _Robert Israel_, Jun 28 2018
%t A132385 Table[Length[Select[Union[Table[Mod[i^3, n], {i, 0, n}], Table[Mod[i^3, n], {i, 0, n}]], PrimeQ[ # ] &]], {n, 1, 70}] (* _Stefan Steinerberger_, Nov 12 2007 *)
%Y A132385 Cf. A000040, A000578, A000720, A056170, A132213.
%K A132385 easy,nonn,look
%O A132385 1,5
%A A132385 _Jonathan Vos Post_, Nov 07 2007
%E A132385 More terms from _Stefan Steinerberger_, Nov 12 2007
%E A132385 Spelling/notation corrections by _Charles R Greathouse IV_, Mar 18 2010