login
A054690
n consecutive primes differ by 4 or more starting at a(n), or n consecutive primes with no twin primes.
2
7, 19, 43, 73, 73, 349, 349, 349, 349, 349, 349, 661, 661, 661, 661, 661, 661, 661, 661, 8629, 8629, 8629, 8629, 13399, 13399, 13399, 14629, 14629, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421, 24421
OFFSET
2,1
LINKS
MAPLE
P:= select(isprime, [seq(i, i=3..10^7, 2)]):
A:= 'A':
state:= 0: smax := 0:
for i from 2 to nops(P) do
if P[i] - P[i-1] >= 4 then
state:= state + 1;
if state > smax then smax:= state; A[state+1]:= P[i-state] fi
else
state:= 0;
fi
od:
seq(A[i], i=2..smax+1); # Robert Israel, Jun 27 2017
MATHEMATICA
Prime[#]&/@With[{pd=If[#>2, 1, 0]&/@Differences[Prime[Range[3000]]]}, Flatten[ Table[ SequencePosition[pd, PadRight[{}, n, 1], 1][[All, 1]], {n, 45}]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 29 2018 *)
CROSSREFS
Sequence in context: A104163 A145993 A265676 * A259486 A298034 A054691
KEYWORD
nonn
AUTHOR
Jeff Burch, Apr 19 2000
STATUS
approved