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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A038698 Surfeit of 4k-1 primes over 4k+1 primes, beginning with prime 2. 4
0, 1, 0, 1, 2, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 4, 3, 2, 3, 4, 5, 6, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 3, 4, 3, 4, 5, 4, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 5, 4, 3, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 6, 5, 6, 5, 6, 5, 6 (list; graph; refs; listen; history; internal format)
OFFSET

1,5

COMMENTS

a(n)<0 for infinitely many values of n - Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 24 2002

First negative value is a(p(2946)) = a(26861) = -1. - David W. Wilson, Sep 27, 2002.

Contribution from Paul Mackenzie (paul.mackenzie(AT)ozemail.com.au), Jul 09 2010: (Start)

The elements of this sequence can be found in the Discrete Fourier Transform

X[f] of length 4N on the prime number sequence x[n] from n=0 to 4N-1, where

x[n] = 1 when n is prime otherwise x[n] is zero. The complex Fourier

components of the nth harmonic equals the complex number

X[N] = -1 + j[pi(4k+1) - pi(4k-1)], where pi(4k+1) and pi(4k-1) are

the number of primes of the form 4k+1 and 4k-1 less than 4N respectively.

(End)

REFERENCES

Stan Wagon, The Power of Visualization, Front Range Press, 1994, p. 2.

LINKS

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

FORMULA

a(n) = sum(k=2, n, (-1)^((prime(n)+1)/2)) - Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 24 2002

MATHEMATICA

FoldList[Plus, 0, Mod[Prime[Range[2, 110]], 4]-2]

PROG

(PARI) for(n=2, 100, print1(sum(i=2, n, (-1)^((prime(i)+1)/2)), ", "))

CROSSREFS

Cf. A007350, A007351, A038691, A066520.

Cf. A112632 (race of 3k-1 and 3k+1 primes)

Cf. A156749 Another sequence showing Chebyshev bias in prime races (mod 4). [From Daniel Forgues (squid(AT)zensearch.com), Mar 26 2009]

Sequence in context: A029376 A029359 A173389 * A087991 A144095 A076092

Adjacent sequences:  A038695 A038696 A038697 * A038699 A038700 A038701

KEYWORD

sign,easy,nice

AUTHOR

Hans Havermann (gladhobo(AT)teksavvy.com)

EXTENSIONS

Moved Mathematica program into Mathematica field from Formula field [Harvey P. Dale, June 25 2011]

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 15:53 EST 2012. Contains 205931 sequences.