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
2, 4, 3, 11, 5, 17, 7, 39, 29, 13, 57, 41, 19, 75, 23, 119, 63, 31, 145, 37, 121, 85, 43, 139, 47, 203, 53, 221, 59, 299, 67, 195, 71, 343, 79, 223, 83, 311, 89, 409, 97, 265, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
1 will not appear in this sequence. Which numbers will not appear? Is it a finite set of numbers?
LINKS
EXAMPLE
1/1 = 1 is not prime. 2/1 = 2 is prime. So a(1) = 2.
(2+1)/2 is not prime. (2+3)/2 is not prime. (2+4)/2 = 3 is prime. So a(2) = 4.
(2+4+1)/3 is not prime. (2+4+3)/3 = 3 is prime. So a(3) = 3.
This process continues.
PROG
(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
CROSSREFS
Sequence in context: A305423 A271866 A093839 * A096780 A332454 A143986
KEYWORD
nonn
AUTHOR
Derek Orr, Oct 18 2014
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 16:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)