A136799 Last term in a sequence of at least 3 consecutive composite integers.
10, 16, 22, 28, 36, 40, 46, 52, 58, 66, 70, 78, 82, 88, 96, 100, 106, 112, 126, 130, 136, 148, 156, 162, 166, 172, 178, 190, 196, 210, 222, 226, 232, 238, 250, 256, 262, 268, 276, 280, 292, 306, 310, 316, 330, 336, 346, 352, 358, 366, 372, 378, 382, 388, 396
Offset: 1
Examples
a(1)=10 because 10 is the last term in a run of three composites beginning with 8 and ending with 10 (8,9,10).
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Carlos Rivera, Puzzle 430, Grimm's Conjecture, Prime puzzles and problems connection.
Programs
-
Magma
[p-1: p in PrimesInInterval(4, 420) | not IsPrime(p - 2)]; // Vincenzo Librandi, Apr 11 2019
-
Mathematica
Select[Prime@ Range@ 78, CompositeQ[# - 2] &] - 1 (* Michael De Vlieger, Oct 23 2015, after PARI *)
-
PARI
forprime(p=5, 1000, if(isprime(p-2)==0, print1(p-1, ", "))) \\ Altug Alkan, Oct 23 2015
-
UBASIC
10 'puzzle 430 (gap finder) 20 N=1 30 A=1:S=sqrt(N):print N; 31 'A=1:S=N\2:print N; 40 B=N\A 50 if B*A=N and B=prmdiv(B) then print B; 60 A=A+1 70 if A<=sqrt(N) then 40 71 'if A<=N\2 then 40 80 C=C+1:print C 90 N=N+1: if N=prmdiv(N) then C=0:print:stop:goto 90:else 30
Formula
a(n) = A025584(n+2) - 1. - R. J. Mathar, Jan 24 2008
a(n) ~ n log n. - Charles R Greathouse IV, Oct 27 2015
Extensions
Edited by R. J. Mathar, May 27 2009
a(53) corrected by Bill McEachen, Oct 27 2015
Comments