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.

A373618 Least prime starting a run of n consecutive primes p_i, i=1..n, such that p_i + 1 is squarefree and p_(n+1) + 1 is not squarefree.

Original entry on oeis.org

2, 37, 397, 389, 11617, 11597, 11593, 2048509, 2772409, 5193997, 33933701, 125624813, 125624809, 432787781, 432787777, 4762221193, 4762221181, 182839149373, 547414016069, 551900822513
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 11 2024

Keywords

Examples

			a(1) = 2, because 2 is the least prime starting a run of 1 prime such that 2+1 is squarefree and 3+1 = 4 = 2^2 is not squarefree.
For n=4 the first run of 4 squarefree p+1 starts at a(4) = 389, and no run of n=3 so a(3) = 397 is the ending 3 of this run.
  p              = 389, 397, 401, 409, 419
  p+1 squarefree = yes  yes  yes  yes  no
  n=4 run          \----------------/
  n=3 run               \-----------/
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=1}, While[pr=Product[Boole[SquareFreeQ[Prime[k+i-1]+1]], {i, n}]==0||pr&& Boole[SquareFreeQ[Prime[k+n]+1]]==1, k++]; Prime[k]]; Array[a, 8] (* Stefano Spezia, Jun 11 2024 *)