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”).

Numbers n such that 30*n+{1,7,11,13,17,23,29} are all prime.
2

%I #23 Sep 06 2023 11:49:10

%S 1,53887,114731,123306,139742,210554,471745,480859,619039,630862,

%T 858929,1075873,1306614,1714945,1913514,2767458,3014285,3454137,

%U 3518243,3699151,3864512,3874291,4274376,4862362,4878329,4937822

%N Numbers n such that 30*n+{1,7,11,13,17,23,29} are all prime.

%C Values are 1 mod 7.

%C In each case, the 7 primes are necessarily consecutive. See the comment in A100418. - _Peter Munn_, Sep 06 2023

%p a:= proc(n) option remember;

%p local m;

%p if n=1 then 1

%p else for m from 30*(a(n-1)+7) by 210

%p while not (isprime (m+1) and isprime (m+7) and

%p isprime (m+11) and isprime (m+13) and

%p isprime (m+17) and isprime (m+23) and

%p isprime (m+29))

%p do od; m/30

%p fi

%p end:

%p seq (a(n), n=1..10);

%t Select[Range[5000000],And@@PrimeQ/@(30(#)+{1,7,11,13,17,23,29})&] (* _Harvey P. Dale_, Feb 23 2011 *)

%o (Magma) [ n: n in [0..5000000] | forall{ q: q in [1, 7, 11, 13, 17, 23, 29] | IsPrime(30*n+q) } ]; // _Klaus Brockhaus_, Feb 23 2011

%Y Cf. A005776, A007775, A076205, A100418-A100423.

%K easy,nonn

%O 1,2

%A Ferenc Adorjan (fadorjan(AT)freemail.hu), Nov 19 2004

%E Edited by _Don Reble_, Nov 17 2005