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!)
A123133 Sum of pairs of consecutive primes ( p(2n-1)+p(2n) ) and sum of pairs of consecutive nonprime numbers ( np(2n-1)+np(2n) ) in order. 0
5, 5, 12, 14, 19, 24, 26, 31, 36, 38, 43, 49, 52, 53, 58, 65, 68, 69, 74, 79, 84, 86, 91, 97, 100, 101, 106, 111, 115, 120, 122, 127, 131, 137, 138, 142, 149, 152, 153, 158, 163, 169, 172, 173, 178, 183, 187, 191, 197, 198, 202, 209, 210, 214, 221, 222, 226, 231 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
A. Frank & P. Jacqueroux, International Contest, 2001. Item 13
EXAMPLE
a(1) = 1 + 4 = 5, a(2) = 2 + 3 = 5, a(3) = 5 + 7 = 12, a(4) = 6 + 8 = 14, a(5)= 9 + 10 = 19, a(6) = 11 + 13 = 24, a(7) = 12 + 14 = 26, a(8) = 15 + 16 = 31,...
MATHEMATICA
upto=250; Select[Sort[Join[Total/@Partition[Prime[Range[Ceiling[PrimePi[ upto/2]]]], 2], Total/@Partition[Select[Range[Ceiling[upto/2]], !PrimeQ[#]&], 2]]], #<=upto&] (* Harvey P. Dale, Aug 25 2011 *)
PROG
(PARI) nonprimenum=[]; for(n=1, 200, if(!isprime(n), nonprimenum=concat(nonprimenum, n))); primenum=[]; forprime(n=1, 200, primenum=concat(primenum, n)); nonprimepair=[]; forstep(n=1, length(nonprimenum), 2, nonprimepair=concat(nonprimepair, nonprimenum[n]+nonprimenum[n+1])); primepair=[]; forstep(n=1, length(primenum), 2, primepair=concat(primepair, primenum[n]+primenum[n+1])); vecsort(concat(nonprimepair, primepair))
CROSSREFS
Sequence in context: A222681 A061391 A168336 * A328367 A338085 A302676
KEYWORD
nonn
AUTHOR
Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 30 2006
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 May 17 03:33 EDT 2024. Contains 372577 sequences. (Running on oeis4.)