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.

A132213 Number of distinct primes among the squares mod n.

This page as a plain text file.
%I A132213 #21 Mar 02 2018 17:16:50
%S A132213 0,0,0,0,0,1,1,0,1,1,2,0,1,3,0,0,2,2,4,1,1,3,3,0,2,4,3,0,4,1,4,1,2,4,
%T A132213 2,1,3,6,2,0,5,2,6,2,2,7,5,0,6,5,3,3,8,6,3,0,3,6,8,0,6,8,3,2,2,3,7,3,
%U A132213 3,2,7,0,9,10,3,4,6,4,9,1,10,10,11,1,2,13,3,0,10,4,5,4,4,13,4,1,11,10,4,4
%N A132213 Number of distinct primes among the squares mod n.
%C A132213 It appears that a(n)=0 for only the 30 numbers in A065428, which appears to be related to idoneal numbers, A000926. The graph shows a(n) can be quite small even for large n. For example, a(9240)=7. Observe that the graph up to n=10000 appears to have 5 components. Why?
%C A132213 The logarithmic plot of the first 10^6 terms shows seven components.
%C A132213 From _Rémy Sigrist_, Nov 28 2017: (Start)
%C A132213 Empirically, in the logarithmic plot of the sequence:
%C A132213 - the set of indices of the first component (starting from the top), say S_1, is the union of A061345 and of A278568,
%C A132213 - the set of indices of the n-th component (for n > 1), say S_n, contains the numbers k not in a previous component and such that (omega(k) = n-1) or (omega(k) = n and val(k) = 0 or 2) or (omega(k) = n+1 and val(k) = 1) (where omega(k) = A001221(k) and val(k) = A007814(k)),
%C A132213 - see logarithmic scatterplot colored according to this scheme in Links section.
%C A132213 (End)
%H A132213 T. D. Noe, <a href="/A132213/b132213.txt">Table of n, a(n) for n = 1..10000</a>
%H A132213 T. D. Noe, <a href="http://www.sspectra.com/math/A132213.gif">Logarithmic plot of 10^6 terms</a>
%H A132213 Rémy Sigrist, <a href="/A132213/a132213.png">Colored logarithmic plot of 2*10^6 terms</a>
%e A132213 For n=14, the squares (mod n) repeat 0,1,4,9,2,11,8,7,8,11,2,9,4,1,0,..., a sequence containing three distinct primes: 2, 7 and 11. Hence a(14)=3.
%t A132213 Table[s=Union[Mod[Range[n]^2,n]]; Length[Select[s,PrimeQ]], {n,10000}]
%t A132213 Table[Count[Union[PowerMod[Range[n],2,n]],_?PrimeQ],{n,100}] (* _Harvey P. Dale_, Mar 02 2018 *)
%o A132213 (Haskell)
%o A132213 import Data.List (nub, genericTake)
%o A132213 a132213 n = sum $ map a010051' $
%o A132213             nub $ genericTake n $ map (`mod` n) $ tail a000290_list
%o A132213 -- _Reinhard Zumkeller_, Jun 23 2015, Oct 15 2011
%Y A132213 Cf. A000224 (number of squares mod n).
%Y A132213 Cf. A000290, A001221, A007814, A010051, A061345, A278568.
%K A132213 nice,nonn,look
%O A132213 1,11
%A A132213 _T. D. Noe_, Aug 13 2007, Aug 17 2007