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!)
A024698 a(n) = (prime(n+1) - 1)/4 if this is an integer or (prime(n+1) + 1)/4 otherwise. 3
1, 1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 15, 17, 18, 18, 20, 21, 22, 24, 25, 26, 27, 27, 28, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 45, 48, 48, 49, 50, 53, 56, 57, 57, 58, 60, 60, 63, 64, 66, 67, 68, 69, 70, 71, 73, 77, 78, 78, 79, 83, 84, 87, 87, 88, 90, 92, 93, 95, 96, 97, 99, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
REFERENCES
J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 283.
LINKS
FORMULA
a(n) = ceiling((prime(n+1)-1)/4). - Robert Israel, Jan 23 2018
a(n) = number of consecutive pairs of quadratic residues in 0,1,...,p-1 where p=prime(n+1). - Michael Somos, Feb 17 2020
EXAMPLE
a(4)=3 because for p=11, (0,1), (3,4), (4,5) are the pairs of consecutive quadratic residues modulo p. - Michael Somos, Feb 17 2020
MAPLE
[seq(ceil((ithprime(i)-1)/4), i=2..100)]; # Robert Israel, Jan 23 2018
MATHEMATICA
pi[n_]:=Module[{c=(Prime[n+1]-1)/4}, If[IntegerQ[c], c, (Prime[n+1]+1)/4]]; Array[pi, 80] (* Harvey P. Dale, May 19 2018 *)
CROSSREFS
Sequence in context: A029928 A101788 A348776 * A011883 A034886 A011882
KEYWORD
nonn
AUTHOR
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 July 14 20:49 EDT 2024. Contains 374323 sequences. (Running on oeis4.)