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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008347 a(n) = sum_{i=0..n-1} (-1)^i prime(n-i). 9
0, 2, 1, 4, 3, 8, 5, 12, 7, 16, 13, 18, 19, 22, 21, 26, 27, 32, 29, 38, 33, 40, 39, 44, 45, 52, 49, 54, 53, 56, 57, 70, 61, 76, 63, 86, 65, 92, 71, 96, 77, 102, 79, 112, 81, 116, 83, 128, 95, 132, 97, 136, 103, 138, 113, 144, 119, 150, 121, 156, 125, 158, 135, 172, 139, 174, 143 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

Define the sequence b(n) by b(1) = 1; b(n) = 1-(prime(n-1)/prime(n))*b(n-1) if n > 1. Then b(n) = a(n)/prime(n). Does lim b(n) exist? If so, it must equal 1/2. - Joseph L. Pe, Feb 17 2003

This sequence contains no duplicate values; after the initial 0,2, the parity alternates, and a(n+2) > a(n). Do even and odd values trade the lead infinitely often (as would be expected if we model their difference as a random walk)? [From Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), Jan 25 2010]

LINKS

T. D. Noe, Table of n, a(n) for n = 0..2000

FORMULA

a(n) = prime(n) - a(n-1) for n>=1.

MAPLE

A008347 := proc(n) options remember; if n = 0 then 0 else abs(A008347(n-1)-ithprime(n)); fi; end;

MATHEMATICA

Join[{0}, Abs[Accumulate[Times@@@Partition[Riffle[Prime[Range[80]], {1, -1}], 2]]]] (* From Harvey P. Dale, Dec 11 2011 *)

CROSSREFS

Sequence in context: A074987 A128280 A106625 * A112387 A193174 A076077

Adjacent sequences:  A008344 A008345 A008346 * A008348 A008349 A008350

KEYWORD

nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com) and J. H. Conway (conway(AT)math.princeton.edu)

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 17 11:30 EST 2012. Contains 206011 sequences.