login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that 10k+7 is composite but 10k+1, 10k+3, 10k+9 are all prime.
2

%I #21 Dec 09 2022 15:12:09

%S 7,43,103,106,145,238,271,409,472,544,574,670,721,904,934,1009,1183,

%T 1204,1261,1282,1372,1636,1669,1729,1792,1921,1975,2002,2149,2152,

%U 2254,2320,2437,2560,2593,2611,2695,2779,2857,2866,2875,3085,3115,3118,3256

%N Numbers k such that 10k+7 is composite but 10k+1, 10k+3, 10k+9 are all prime.

%H V. Raman, <a href="/A216301/b216301.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) >> n log^3 n. - _Charles R Greathouse IV_, Sep 07 2012

%t t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[ps == {10*n + 1, 10*n + 3, 10*n + 9}, AppendTo[t, n]], {n, 0, 4999}]; t (* _T. D. Noe_, Sep 03 2012 *)

%t cprQ[n_]:=Module[{c=10n},!PrimeQ[c+7]&&And@@PrimeQ[c+{1,3,9}]]; Select[ Range[ 4000],cprQ] (* _Harvey P. Dale_, May 28 2014 *)

%t Select[Range[4000],Boole[PrimeQ[10 #+{1,3,7,9}]]=={1,1,0,1}&] (* _Harvey P. Dale_, Dec 09 2022 *)

%Y Cf. A032352, A007811, A078494.

%K nonn

%O 1,1

%A _V. Raman_, Sep 03 2012