|
Search: id:A130290
|
|
|
| A130290 |
|
Number of nonzero quadratic residues modulo the n-th prime. |
|
+0 6
|
|
| 1, 1, 2, 3, 5, 6, 8, 9, 11, 14, 15, 18, 20, 21, 23, 26, 29, 30, 33, 35, 36, 39, 41, 44, 48, 50, 51, 53, 54, 56, 63, 65, 68, 69, 74, 75, 78, 81, 83, 86, 89, 90, 95, 96, 98, 99, 105, 111, 113, 114, 116, 119, 120, 125, 128
(list; graph; listen)
|
|
|
OFFSET
|
1,3
|
|
|
COMMENT
|
Row lengths for formatting A063987 as a table: The number of nonzero quadratic residues modulo a prime p equals floor(p/2), or (p-1)/2 if p is odd. The number of squares including 0 is (p+1)/2, if p is odd (rows prime[i] of A096008 formatted as a table). In fields of characteristic 2, all elements are squares. For any m>0, floor(m/2) is the number of even positive integers less than or equal to m, so a(n) also equals the number of even positive integers less than or equal to the n-th prime. For all n>0, A130290(n+1) = A005097(n) = A102781(n+1) = A111332(n+1) = A130291(n+1)-1 = A111333(n+1)-1 = A006254(n)-1.
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Quadratic Residue
Wikipedia, Quadratic Residue
|
|
FORMULA
|
a(n) = floor( A000040(n)/2 ) = #{ even positive integers <= A000040(n) }
|
|
EXAMPLE
|
a(1)=1 since the only nonzero element of Z/2Z equals its square.
a(3)=2 since 1=1^2=(-1)^2 and 4=2^2=(-2)^2 are the only nonzero squares in Z/5Z.
a(1000000) = 7742931 = (p[1000000]-1)/2.
|
|
MATHEMATICA
|
Quotient[Prime[Range[66]], 2] [From Vladimir Orlovsky (4vladimir(AT)gmail.com), Sep 20 2008]
|
|
PROGRAM
|
(PARI) A130290(n) = prime(n)>>1
|
|
CROSSREFS
|
Essentially the same as A005097.
Cf. A005097 (Odd primes - 1)/2, A102781 (Integer part of n#/(n-2)#/2#), A111332 (Number of even numbers less than the n-th prime), A063987 (quadratic residues modulo the n-th prime), A006254 (Numbers n such that 2n-1 is prime), A111333 (Number of odd numbers <= n-th prime), A000040 (prime numbers), A130291.
Adjacent sequences: A130287 A130288 A130289 this_sequence A130291 A130292 A130293
Sequence in context: A093689 A097702 A082583 this_sequence A102781 A005097 A111332
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
M. F. Hasler (Maximilian.Hasler(AT)gmail.com), May 21 2007
|
|
|
Search completed in 0.003 seconds
|