

A091850


a(1) = 1; a(n) is the smallest positive integer not already in the sequence such that Sum_{k=1..n} k*a(k) is a prime.


1



1, 2, 4, 3, 6, 5, 12, 7, 16, 9, 14, 13, 8, 11, 10, 17, 18, 15, 22, 24, 20, 23, 26, 25, 30, 28, 32, 33, 38, 29, 48, 27, 34, 44, 36, 19, 42, 47, 52, 35, 50, 21, 56, 53, 46, 39, 60, 45, 54, 31, 40, 37, 58, 49, 70, 55, 68, 61, 72, 43, 98, 41, 74, 57, 84, 59, 78, 64, 82
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Proposed by Leroy Quet, Feb 13 2004; computed by several people including Fred W. Helenius, Feb 14 2004.
Comment from Fred Helenius: Every positive integer up to 82 appears in the first 100 terms; everything up to 922 appears in the first 1000. Apart from a(1), oddindexed terms must be even; evenindexed terms are occasionally even as well, so the odd values tend to arrive late.


LINKS



PROG

(PARI) v=[1]; n=1; while(n<100, s=n*(#v+1)+sum(i=1, #v, i*v[i]); if(isprime(s)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v \\ Derek Orr, Jun 03 2015


CROSSREFS



KEYWORD

nonn,easy


AUTHOR



STATUS

approved



