The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A014686 In sequence of prime numbers add 1 to first prime, 3rd prime, fifth prime, ... then subtract 1 from 2nd prime, fourth prime, sixth prime and so on. 7
3, 2, 6, 6, 12, 12, 18, 18, 24, 28, 32, 36, 42, 42, 48, 52, 60, 60, 68, 70, 74, 78, 84, 88, 98, 100, 104, 106, 110, 112, 128, 130, 138, 138, 150, 150, 158, 162, 168, 172, 180, 180, 192, 192, 198, 198, 212, 222, 228, 228, 234, 238, 242, 250, 258, 262, 270, 270 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n)=prime(n)-(-1)^n=A000040(n)-A033999(n+1). [From Juri-Stepan Gerasimov, Sep 11 2009]
MATHEMATICA
Module[{nn=60}, Total/@Partition[Riffle[Prime[Range[nn]], {1, -1}, {2, -1, 2}], 2]] (* Harvey P. Dale, Oct 04 2019 *)
CROSSREFS
Sequence in context: A096375 A062200 A114208 * A053090 A264400 A365660
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Andrew J. Gacek (andrew(AT)dgi.net)
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 June 7 14:59 EDT 2024. Contains 373202 sequences. (Running on oeis4.)