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!)
A054892 Smallest prime a(n) such that the sum of n consecutive primes starting with a(n) is divisible by n. 5

%I #19 Jul 11 2023 16:55:13

%S 2,3,3,5,71,5,7,17,239,13,29,5,43,23,5,5,7,7,79,17,47,11,2,73,97,53,

%T 271,13,263,23,41,61,97,101,181,41,47,13,233,13,53,13,359,151,71,61,

%U 239,73,443,859,29,131,2,61,313,101,19,151,521,3,571,31,7,79,109,97,53

%N Smallest prime a(n) such that the sum of n consecutive primes starting with a(n) is divisible by n.

%C See A132809 for another version.

%C In some cases (n=1,2,25,..), like a(25)=97, the sum of 25 consecutive primes starts with the 25th prime and is divided by 25: Sum=97+...+227=3925=25*157

%H Zak Seidov, <a href="/A054892/b054892.txt">Table of n, a(n) for n = 1..1000</a>

%F Min[q_1; Sum[q_i; {i, 1, n}]]=n*X], q_i is a prime (rarely only q_i=Prime[i])

%e a(8) = 17 since the sum of the 8 consecutive primes starting with 17 is 17 + 19 + 23 + 29 + 31 + 37 + 41 + 43 = 240, which is divisible by 8. No prime less than 17 has this property: for example, 7 + 11 + ... + 31 = 150 which is not divisible by 8.

%t f[n_] := Block[{k = 1, t}, While[t = Table[Prime[i], {i, k, k + n - 1}]; Mod[Plus @@ t, n] > 0, k++ ]; t]; First /@ Table[f[n], {n, 67}] (* _Ray Chandler_, Oct 09 2006 *)

%t Module[{prs=Prime[Range[250]]},Table[SelectFirst[Partition[prs,n,1],Mod[Total[#],n]==0&],{n,70}]][[;;,1]] (* _Harvey P. Dale_, Jul 11 2023 *)

%Y Cf. A054643, A024672, A034961, A077388, A077389, A122820, A132809.

%K nonn

%O 1,1

%A _Labos Elemer_, May 23 2000

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 April 19 14:04 EDT 2024. Contains 371792 sequences. (Running on oeis4.)