cp's OEIS Frontend

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.

Previous Showing 21-22 of 22 results.

A256302 Least prime p such that p+3*k*(k+1) is prime for all k=0,...,n.

Original entry on oeis.org

2, 5, 5, 5, 11, 11, 11, 11, 11, 11, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23
Offset: 0

Views

Author

M. F. Hasler, Apr 05 2015

Keywords

Comments

Inspired by the so-called prime-generating polynomials.
Since p | 3n(n+1) for n=p-1, one has a(n) > p(n). Otherwise stated, a(p-1) = p (as, e.g., for p=23) is optimal.

Crossrefs

Programs

  • PARI
    a(n)=forprime(p=1,,for(i=1,n,ispseudoprime(p+3*(i+1)*i)||next(2));return(p))

A284043 Starts of a run of at least n consecutive numbers k for which k^2 - k + 41 is composite.

Original entry on oeis.org

41, 41, 122, 162, 299, 326, 326, 1064, 1064, 1064, 1064, 1064, 5664, 5664, 5664, 5664, 9265, 9265, 9265, 22818, 22818, 37784, 37784, 47494, 100202, 100202, 100202, 167628, 167628, 167628, 167628, 167628, 167628, 167628, 167628, 176956, 176956, 176956, 1081297
Offset: 1

Views

Author

Amiram Eldar, Jun 14 2017

Keywords

Comments

This sequence is inspired by the problem proposed by Sidney Kravitz in 1963: "It is known that f(n)=n^2-n+41 yields prime numbers for n=1, 2, ..., 40. Find a sequence of 40 consecutive values of n for which f(n) is composite." Lawrence A. Ringenberg and others suggested the solution that starts at f(1)*f(2)*...*f(40)+1 (about 4.890... * 10^101). B. A. Hausmann suggested the smaller solution that starts at f(1)*f(2)*...*f(20)-19 (about 3.213... * 10^42). The smallest solution is a(40) = 1081297.

Examples

			The values of f(n)=n^2-n+41 at 122, 123 and 124 are: 14803 = 113*131, 15047 = 41*367 and 15293 = 41*373. This is the first case of 3 consecutive composite values, thus a(3) = 122.
		

References

  • Thomas Koshy, Elementary Number Theory with Applications, Academic Press, 2nd edition, 2007, Chapter 2, p. 147, exercise 50.

Crossrefs

Programs

  • Mathematica
    f[n_] := n^2 - n + 41; a = PrimeQ[f[Range[1, 10^7]]]; b = Split[a]; c = Length /@ b; d = Accumulate[c]; nc = Length[c]; e = {}; For[len = 0, len < 100, len++; k = 2;  While[k <= nc && c[[k]] < len, k += 2]; If[k <= nc && c[[k]] >= len, ind = d[[k - 1]] + 1; e = AppendTo[e, ind]]]; e
Previous Showing 21-22 of 22 results.