login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154587 Numbers that can be expressed both as the sum of first prime numbers and as the sum of first nonprime numbers. 4
0, 5, 28, 71208, 74139, 9260197734, 12374540078, 7574780746329, 11101148723618, 102581905748236, 3325997869054417, 2886018916559052244845, 46437379006448216748610, 120197329614203475099994 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Is this sequence finite?

Intersection of A007504 and A053767 generates A294174. - R. J. Mathar, Jan 17 2009

Heuristically, the sequence is infinite with about 2 sqrt(log x) members up to x. - Charles R Greathouse IV, Aug 14 2013

LINKS

Table of n, a(n) for n=1..14.

Giovanni Resta, C program

EXAMPLE

5 = 2+3 = 1+4. 28 = 2+3+5+7+11 = 1+4+6+8+9.

MAPLE

P:=proc(q) local a, b, c, d, n; a:=0; b:=0; c:=0; d:=0; print(a);

for n from 1 to q do b:=nextprime(b); a:=a+b;

while c<a do d:=d+1; if not isprime(d) then c:=c+d; fi; od;

if c=a then print(a); fi; od; end: P(10^9); # Paolo P. Lava, Feb 23 2018

MATHEMATICA

With[{p = Prime@ Range[10^7]}, {0}~Join~Intersection[Accumulate@ p, Accumulate@ Complement[Range@ Max@ p, p]]] (* Michael De Vlieger, Feb 25 2018 *)

CROSSREFS

Intersection of A007504 and A051349. - R. J. Mathar, Jan 17 2009

Cf. A133784, A294174.

Sequence in context: A057642 A125137 A132550 * A083020 A033503 A181616

Adjacent sequences:  A154584 A154585 A154586 * A154588 A154589 A154590

KEYWORD

nonn,more,nice

AUTHOR

Paolo P. Lava and Giorgio Balzarotti, Jan 15 2009

EXTENSIONS

Corrected definition and a(6)-a(7) from R. J. Mathar, Jan 17 2009

a(8)-a(11) from Donovan Johnson, Feb 19 2009

a(12)-a(14) from Giovanni Resta, Aug 14 2013

Edited and a(1)=0 prepended by Max Alekseyev, Feb 10 2018

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 26 23:42 EDT 2021. Contains 347673 sequences. (Running on oeis4.)