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

 

Logo


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

1,3

COMMENTS

Cumulative sums of A134323. The first negative term is a(23338590792) for the prime 608981813029. See page 4 of the paper by Granville and Martin. - T. D. Noe, Jan 23 2008

REFERENCES

Andrew Granville and Greg Martin, Prime Number Races, Amer. Math. Monthly, Vol. 113, No. 1 (Jan. 2006), pp. 1-33.

LINKS

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

EXAMPLE

a(1)=1 because 2 is -1 mod 3

a(2)=1 because 3 is 0 mod 3 and does not change the accounting

a(3)=2 because 5 is -1 mod 3

a(4)=1 because 7 is 1 mod 3

MATHEMATICA

a[n_] := a[n] = a[n-1] + If[Mod[Prime[n], 6] == 1, -1, 1]; a[1] = a[2] = 1; Table[a[n], {n, 1, 100}]  (* Jean-Fran├žois Alcover, Jul 24 2012 *)

Accumulate[Which[IntegerQ[(#+1)/3], 1, IntegerQ[(#-1)/3], -1, True, 0]& /@ Prime[ Range[100]]] (* Harvey P. Dale, Jun 06 2013 *)

PROG

(Haskell)

a112632 n = a112632_list !! (n-1)

a112632_list = scanl1 (+) $ map negate a134323_list

-- Reinhard Zumkeller, Sep 16 2014

CROSSREFS

Cf. A038698, A007352, A098044.

Cf. A134323.

Sequence in context: A103682 A023134 A272863 * A254575 A275344 A206826

Adjacent sequences:  A112629 A112630 A112631 * A112633 A112634 A112635

KEYWORD

sign,nice

AUTHOR

Roger Hui, Dec 22 2005

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified September 26 05:09 EDT 2017. Contains 292502 sequences.