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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A051838 Numbers k such that sum of first k primes divides product of first k primes. 19
 1, 3, 8, 13, 23, 38, 39, 41, 43, 48, 50, 53, 56, 57, 58, 66, 68, 70, 73, 77, 84, 90, 94, 98, 126, 128, 134, 140, 143, 145, 149, 151, 153, 157, 160, 164, 167, 168, 172, 174, 176, 182, 191, 194, 196, 200, 210, 212, 215, 217, 218, 219, 222, 225, 228, 229 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe) FORMULA From Reinhard Zumkeller, Oct 03 2011: (Start) A002110(a(n)) mod A007504(a(n)) = 0. A116536(n) = A002110(a(n)) / A007504(a(n)). (End) EXAMPLE Sum of first 8 primes is 77 and product of first 8 primes is 9699690. 77 divides 9699690 therefore a(3)=8. MAPLE P:=proc(q) local i, m, n, p, s; m:=1; s:=0; n:=[]; for i from 1 to q do p:=ithprime(i); m:=m*p; s:=s+p; if frac(m/s)=0 then n:=[op(n), i]; fi; od; op(n); end: P(230); # Paolo P. Lava, Dec 20 2018 MATHEMATICA p = Prime@ Range@ 250; Flatten@ Position[ Mod[ First@#, Last@#] & /@ Partition[ Riffle[ Rest[ FoldList[ Times, 1, p]], Accumulate@ p], 2], 0] (* Harvey P. Dale, Dec 19 2010 *) PROG (Haskell) import Data.List (elemIndices) a051838 n = a051838_list !! (n-1) a051838_list = map (+ 1) \$ elemIndices 0 \$ zipWith mod a002110_list a007504_list -- Reinhard Zumkeller, Oct 03 2011 (PARI) for(n=1, 100, P=prod(i=1, n, prime(i)); S=sum(i=1, n, prime(i)); if(!(P%S), print1(n, ", "))) \\ Derek Orr, Jul 19 2015 (PARI) isok(n) = my(p = primes(n)); (vecprod(p) % vecsum(p)) == 0; \\ Michel Marcus, Dec 20 2018 (GAP) P:=Filtered([1..2000], IsPrime);; Filtered([1..Length(P)], n->Product([1..n], i->P[i]) mod Sum([1..n], i->P[i])=0); # Muniru A Asiru, Dec 20 2018 CROSSREFS Cf. A007504, A002110, A159639, A196415. A116536 gives the quotients, A140763 the divisors and A159578 the dividends. Sequence in context: A194427 A335048 A185954 * A076792 A146939 A181540 Adjacent sequences: A051835 A051836 A051837 * A051839 A051840 A051841 KEYWORD nonn AUTHOR G. L. Honaker, Jr., Dec 12 1999 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 December 9 17:01 EST 2022. Contains 358701 sequences. (Running on oeis4.)