The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242736 Number of solutions of a^2 + b^2 congruent to -1 modulo the n-th prime. 1
0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 12, 13, 13, 13, 14, 14, 15, 16, 17, 18, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 25, 27, 28, 29, 29, 30, 30, 31, 32, 33, 33, 34, 34, 35, 36, 36, 37, 39, 39, 40, 40, 42, 43, 44, 44 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
a(n) is the number of solutions of a^2 + b^2 congruent to -1 modulo the n-th prime, where 0 <= a <= b <= floor((p-1)/2).
Is this sequence nondecreasing? The data for the first thousand terms supports this conjecture.
LINKS
FORMULA
See the answer given in the link above.
For n>1, a(n) = ceiling(p(n)/8), where p(n) is the n-th prime.
EXAMPLE
For n=5: The 5th prime is 11. 1^2 + 3^2 = 10 is congruent to -1 (mod 11) and 4^2 + 4^2 = 32 is congruent to -1 (mod 11).
MAPLE
A242736:=n->ceil(ithprime(n)/8): 0, seq(A242736(n), n=2..100); # Wesley Ivan Hurt, Dec 12 2015
MATHEMATICA
iend=50;
For[n=1, n<=iend, n++,
p=Prime[n];
count[n]=0;
For[i=0, i<=(p-1)/2, i++,
For[j=i, j<=(p-1)/2, j++,
If[Mod[i^2+j^2, p]==p-1, count[n]++; ]]]]
Print[Table[count[i], {i, 1, iend}]]
CROSSREFS
Sequence in context: A025777 A269862 A194200 * A194237 A145707 A145703
KEYWORD
nonn,easy
AUTHOR
David S. Newman, May 21 2014
EXTENSIONS
More terms from Alois P. Heinz, Jun 17 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 11:17 EDT 2024. Contains 372552 sequences. (Running on oeis4.)