|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|