login
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