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!)
A236965 Number of nonzero quartic residues modulo the n-th prime. 1
1, 1, 1, 3, 5, 3, 4, 9, 11, 7, 15, 9, 10, 21, 23, 13, 29, 15, 33, 35, 18, 39, 41, 22, 24, 25, 51, 53, 27, 28, 63, 65, 34, 69, 37, 75, 39, 81, 83, 43, 89, 45, 95, 48, 49, 99, 105, 111, 113, 57, 58, 119, 60, 125, 64, 131, 67, 135, 69, 70, 141, 73, 153, 155, 78 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
For odd primes, if prime(n)=4k+1 then a(n)=(prime(n)-1)/4, if prime(n)=4k+3 then a(n)=(prime(n)-1)/2.
a(n) = numerator(1/2 - 1/(prime(n)+1)). - Michel Marcus, Feb 26 2019
EXAMPLE
a(5)=5 for x^4 (mod 11=prime(5)) equals 1, 3, 4, 5, 9.
PROG
(PARI) a(n) = numerator(1/2 - 1/(prime(n)+1)); \\ Michel Marcus, Feb 26 2019
(PARI) a(n) = my(p=prime(n)); sum(k=0, p-1, m = Mod(k, p); m && ispower(Mod(k, p), 4)); \\ Michel Marcus, Feb 26 2019
(Python)
from sympy import prime
from fractions import Fraction
def a(n): return (Fraction(1, 2) - Fraction(1, (prime(n)+1))).numerator
print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Jun 04 2021
CROSSREFS
Sequence in context: A210606 A254327 A175999 * A259684 A214287 A010703
KEYWORD
nonn,frac
AUTHOR
Carmine Suriano, Apr 22 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 April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)