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!)
A248981 Sequence of distinct least positive numbers such that the average of the first n terms is prime. 0

%I #13 Jun 29 2015 08:48:23

%S 2,4,3,11,5,17,7,39,29,13,57,41,19,75,23,119,63,31,145,37,121,85,43,

%T 139,47,203,53,221,59,299,67,195,71,343,79,223,83,311,89,409,97,265,

%U 101,189,103,287,107,395,113,813,127,335,131,455,137,249,709,149,267,151,517,157,535,163,423,167,569,173,587,179,321,181,911,191

%N Sequence of distinct least positive numbers such that the average of the first n terms is prime.

%C 1 will not appear in this sequence. Which numbers will not appear? Is it a finite set of numbers?

%e 1/1 = 1 is not prime. 2/1 = 2 is prime. So a(1) = 2.

%e (2+1)/2 is not prime. (2+3)/2 is not prime. (2+4)/2 = 3 is prime. So a(2) = 4.

%e (2+4+1)/3 is not prime. (2+4+3)/3 = 3 is prime. So a(3) = 3.

%e This process continues.

%o (PARI) v=[2]; n=1; while(#v<200, s=(n+vecsum(v))/(#v+1); if(type(s)=="t_INT", if(isprime(s)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0)); n++); v

%Y Cf. A000040, A073883.

%K nonn

%O 1,1

%A _Derek Orr_, Oct 18 2014

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 24 06:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)