The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A133784 Positive integers n such that the sum of all primes <= n divides n(n+1)/2. 2
 4, 21, 24, 71 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Also, positive integers n for which the sum of all primes <= n divides the sum of all nonprimes <= n. Is this sequence finite? No other terms below 10^13. - Max Alekseyev, Nov 28 2017 Sequence is probably complete; integral_{x=10^10..infinity} (2 log x)/x^2 dx = 4.80517... * 10^-9. - Charles R Greathouse IV, Mar 21 2013 LINKS EXAMPLE n=21 is in this sequence since the sum of the primes <=21 is 2+3+5+7+11+13+17+19=77 and 77 divides 21*22/2=231. MAPLE P:=proc(n) local i, snp, sp; snp:=1; sp:=2; for i from 3 by 1 to n do if isprime(i) then sp:=sp+i; else snp:=snp+i; fi; if trunc(snp/sp)=snp/sp then print(i); fi; od; end: P(10000000); MATHEMATICA Select[Range[2, 100], Divisible[(#(#+1))/2, Total[Prime[Range[ PrimePi[ #]]]]]&] (* Harvey P. Dale, May 31 2012 *) PROG (PARI) A=1; P=0; for(n=2, 1e9, A+=n; P+=isprime(n)*n; if(A%P==0, print1(n", "))) \\ Charles R Greathouse IV, Mar 21 2013 CROSSREFS Cf. A007504, A000217, A051349. Sequence in context: A303722 A305225 A272954 * A041821 A042429 A356357 Adjacent sequences: A133781 A133782 A133783 * A133785 A133786 A133787 KEYWORD nonn AUTHOR Paolo P. Lava and Giorgio Balzarotti, Jan 21 2008 EXTENSIONS Edited by Max Alekseyev, Feb 13 2009 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.

Last modified February 7 12:00 EST 2023. Contains 360115 sequences. (Running on oeis4.)