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

 

Logo

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045985 a(n) = least k such that sum of first k primes is n times a prime. 2
1, 3, 10, 5, 3, 123, 8, 15, 20, 147, 8, 97, 92, 5, 414, 27, 120, 739, 144, 9, 86, 69, 858, 99, 62, 61, 26, 33, 7, 57, 456, 11, 76, 13, 180, 207, 58, 23, 166, 17, 38, 339, 10, 693, 242, 23, 1162, 169, 440, 9, 374, 117, 682, 187, 1284, 683, 70, 281, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

T. D. Noe and R. Zumkeller, Table of n, a(n) for n = 1..10000, first 1000 terms from T. D. Noe.

EXAMPLE

For example a(3)=10 because the partial sum of first 10 primes is 3*43=129

MATHEMATICA

a[n_] := Catch[For[p=0; sp=0; k=1, True, k++, p = NextPrime[p]; sp = sp+p; If[PrimeQ[sp/n], Throw[k]]]]; Table[a[n], {n, 1, 59}] (* Jean-François Alcover, Nov 13 2012 *)

Module[{nn=1500, p, t}, p=Accumulate[Prime[Range[nn]]]; t=Thread[{Range[ nn], p}]; Table[SelectFirst[t, PrimeQ[ #[[2]]/n]&], {n, 60}]][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 16 2020 *)

PROG

(Haskell)

a045985 n = head [k | (k, x) <- zip [1..] a007504_list,

                      let (y, r) = divMod x n, r == 0, a010051' y == 1]

-- Reinhard Zumkeller, Oct 05 2015

CROSSREFS

Cf. A007504, A010051, A053050.

Sequence in context: A192028 A111229 A100984 * A247034 A275511 A035411

Adjacent sequences:  A045982 A045983 A045984 * A045986 A045987 A045988

KEYWORD

nice,nonn

AUTHOR

Felice Russo

EXTENSIONS

More terms from David W. Wilson

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 November 30 16:47 EST 2021. Contains 349423 sequences. (Running on oeis4.)