This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A155884 #6 Feb 21 2022 18:15:42 %S A155884 41,41,43,47,53,61,71,83,97,113,131,151,173,197,223,251,281,313,347, %T A155884 383,421,461,503,547,593,641,691,743,797,853,911,971,1033,1097,1163, %U A155884 1231,1301,1373,1447,1523,1601,41,43,1847,1933,61,2111,2203,2297,2393,131 %N A155884 a(n) = n^2 - n + 41 if this is a prime, a(n) = a(n-40) otherwise. %C A155884 It is well known that for 0 <= n <= 40, the polynomial f(n) = n^2 - n + 41 does yield a prime number, so the sequence is well defined. %C A155884 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 considers f(n) = P(n-1) which is completely equivalent.] %C A155884 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) = f(n). The "substituted" values are easily recognized as they follow local maxima. Of course one could equally well insert a(n) = 2 whenever f(n) is composite. %C A155884 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", does not always produce primes. %o A155884 (PARI) a(n) = { while( !isprime( n^2-n+41 ), n-=40 ); n^2-n+41 } %Y A155884 Cf. A005846, A060566, A142719. %K A155884 easy,nonn %O A155884 0,1 %A A155884 _Roger L. Bagula_ and _M. F. Hasler_, Jan 29 2009