The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A155884 a(n)=n^2-n+41 if this is prime, a(n)=a(n-40) otherwise. 1
 41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601, 41, 43, 1847, 1933, 61, 2111, 2203, 2297, 2393, 131 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS A variant of A005846, A060566, A142719. All these aim at extending the series of prime values of Euler's famous prime-producing polynomial P(n)=n^2+n+41 (see references in A005846). The present sequence is a simplification of an extended variant of A142719. By construction, all terms of the present sequence are prime, but in contrast to A005846, prime values of the polynomial remain at the "correct" position (a(n)=P(n)). The "substituted" values are easily recognized as they follow local maxima. Of course one could equally well insert a(n)=2 whenever P(n) is composite. Note that the present sequence contains only primes. A different sequence, defined by "a(n)=f(n) if this is prime, a(n)=f(n-40) otherwise, where f(n)=n^2-n+41", does not always produce primes. LINKS PROG (PARI) a(n) = { while( !isprime( n^2-n+41 ), n-=40 ); n^2-n+41 } CROSSREFS Cf. A005846, A060566, A142719. Sequence in context: A257362 A330673 A296921 * A202018 A005846 A273756 Adjacent sequences:  A155881 A155882 A155883 * A155885 A155886 A155887 KEYWORD easy,nonn AUTHOR Roger L. Bagula and M. F. Hasler, Jan 29 2009 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 14 01:29 EDT 2021. Contains 345016 sequences. (Running on oeis4.)