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 the string 2222n is the decimal expansion of a prime number.
1

%I #15 Sep 08 2022 08:45:20

%S 9,47,69,89,93,123,141,147,167,177,203,219,239,243,249,251,263,273,

%T 281,287,293,309,317,321,327,333,351,377,383,387,443,477,501,503,509,

%U 527,533,537,543,567,573,579,593,599,611,617,621,629,653,659,663,683

%N Numbers n such that the string 2222n is the decimal expansion of a prime number.

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

%e 177 is in the sequence because 2222177 is prime.

%t Select[Range[700],PrimeQ[FromDigits[Join[{2,2,2,2},IntegerDigits[ #]]]]&] (* _Harvey P. Dale_, Nov 14 2014 *)

%o (Magma) [ n: n in [1..700] | IsPrime(Seqint(Intseq(n) cat [2, 2, 2, 2])) ]; // Klaus Brockhaus, Feb 01 2011

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Sep 14 2005