login
Numbers n such that the string 35n is prime.
0

%I #14 Sep 08 2022 08:45:18

%S 3,9,11,17,27,29,33,39,41,47,57,59,71,81,83,93,107,111,117,129,141,

%T 149,153,159,171,201,221,227,251,257,267,279,281,291,311,317,323,327,

%U 339,353,363,381,393,401,407,419,423,437,447,449,461,491,507,509,521,527

%N Numbers n such that the string 35n is prime.

%e If n=47 then 3547 is prime.

%p A055642 := proc(n) max(1,ilog10(n)+1) ; end: cat2 := proc(a,b) a*10^A055642(b)+b ; end: for n from 1 to 1000 do if isprime( cat2(35,n) ) then printf("%d,",n) ; fi; od: # _R. J. Mathar_, Jan 16 2009

%t Select[Range[600],PrimeQ[FromDigits[Join[{3,5},IntegerDigits[#]]]]&] (* _Harvey P. Dale_, Jun 06 2015 *)

%o (Magma) [ n: n in [1..900] | IsPrime(Seqint(Intseq(n) cat [5, 3])) ]; // _Vincenzo Librandi_, Feb 03 2011

%Y Cf. A032666. - _R. J. Mathar_, Jan 16 2009

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Jun 07 2005