login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Integers n such that prime(n+1)-prime(n) is nonprime, squarefree. Except for the initial term of 1, the terms are k-semiprime for some k>=2.
2

%I #9 Sep 10 2022 12:20:54

%S 1,9,11,15,16,18,21,23,30,32,34,36,37,39,40,42,51,53,54,55,56,58,61,

%T 62,66,67,68,71,73,74,76,80,82,84,86,96,100,101,102,103,105,106,107,

%U 108,110,111,115,118,119,123,125,127,129,130,133,137,138,141,145,146,150

%N Integers n such that prime(n+1)-prime(n) is nonprime, squarefree. Except for the initial term of 1, the terms are k-semiprime for some k>=2.

%H Harvey P. Dale, <a href="/A113339/b113339.txt">Table of n, a(n) for n = 1..1000</a>

%F prime(n+1)-prime(n)=1 or p1*...*pk where p1, ..., pk are two or more distinct primes.

%e prime(69)-prime(68)=347-337=10=2*5.

%p L:=[]: for z to 1 do for k from 1 to 200 do p:=ithprime(k); q:=nextprime(p); x:=q-p; if not(isprime(x)) and issqrfree(x) then L:=[op(L),k] fi od od; L;

%t Flatten[Position[Flatten[Differences/@Partition[Prime[Range[200]],2,1]],_?(!PrimeQ[#] && SquareFreeQ[#]&)]]//Rest (* _Harvey P. Dale_, Sep 10 2022 *)

%Y Cf. A000040, A000469, A001358.

%K easy,nonn

%O 1,2

%A _Walter Kehowski_, Jan 08 2006