Original entry on oeis.org
1, 3, 7, 13, 77, 182, 1100, 1821, 9230
Offset: 1
2^7 = 128 is the sum of two consecutive primes (61,67), therefore 7 is a member of the sequence.
-
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ p = PrevPrim[2^n]; q = NextPrim[2^n]; If[p + q == 2^(n + 1), Print[n+1]], {n, 2, 9230}] (* Robert G. Wilson v, Jan 24 2004 *)
A251609
Least k such that prime(k) + prime(k+1) contains n distinct prime divisors.
Original entry on oeis.org
1, 3, 6, 27, 276, 1755, 24865, 646029, 7946521, 195711271, 4129119136, 198635909763, 6351380968517, 322641218722443, 11068897188590241, 501741852481602261, 24367382928343066431, 1292304206793356882286
Offset: 1
a(1) = 1 because prime(1) + prime(2) = 2 + 3 = 5, which is a prime power and so has one distinct prime divisor; the other prime indices yielding a prime power are 2, 18, 564,...(A071352) since prime(2) + prime(3) = 3 + 5 = 2^3, prime(18) + prime(19) = 61 + 67 = 2^7, prime(564) + prime(565)= 4093 + 4099 = 2^13,...
-
N:= 10^6: # to use primes <= N
Primes:= select(isprime, [2,seq(2*i+1,i=1..(N-1)/2)]):
for i from 1 to nops(Primes)-1 do
f:= nops(numtheory:-factorset(Primes[i]+Primes[i+1]));
if not assigned(A[f]) then A[f]:= i fi
od:
seq(A[j],j=1..max(indices(A))); # Robert Israel, Dec 05 2014
-
lst={};Do[k=1;While[Length[FactorInteger[Prime[k]+Prime[k+1]]]!=n,k++];AppendTo[lst,k],{n,1,5}];lst
Showing 1-2 of 2 results.
Comments