login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A095972 Number of quadratic nonresidues modulo n. 4
0, 0, 1, 2, 2, 2, 3, 5, 5, 4, 5, 8, 6, 6, 9, 12, 8, 10, 9, 14, 13, 10, 11, 18, 14, 12, 16, 20, 14, 18, 15, 25, 21, 16, 23, 28, 18, 18, 25, 31, 20, 26, 21, 32, 33, 22, 23, 40, 27, 28, 33, 38, 26, 32, 37, 44, 37, 28, 29, 48, 30, 30, 47, 52, 44, 42, 33, 50, 45, 46, 35, 60, 36, 36, 53 (list; graph; refs; listen; history; internal format)
OFFSET

1,4

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Quadratic Nonresidue

PROG

(PARI) A095972(n)={local(v); v=vector(n, i, 1); for(i=0, floor(n/2), v[i^2%n+1]=0); sum(i=1, n, v[i])} [From Michael B. Porter (michael_b_porter(AT)yahoo.com), Apr 30 2010]

(PARI) a(n)=my(f=factor(n)); n-prod(i=1, #f[, 1], if(f[i, 1]==2, 2^f[1, 2]\6+2, f[i, 1]^(f[i, 2]+1)\(2*f[i, 1]+2)+1)) \\ Charles R Greathouse IV, Jul 15 2011

CROSSREFS

Cf. A096013.

Sequence in context: A071867 A126337 A036355 * A091974 A029073 A058618

Adjacent sequences:  A095969 A095970 A095971 * A095973 A095974 A095975

KEYWORD

nonn

AUTHOR

Cino Hilliard (hillcino368(AT)gmail.com), Jul 21 2004

EXTENSIONS

Edited by Don Reble (djr(AT)nk.ca), May 07 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 14:37 EST 2012. Contains 205930 sequences.