login
Numbers n such that the string 44n is prime.
1

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

%S 3,9,21,23,41,47,51,57,63,81,83,93,101,111,119,123,129,131,159,171,

%T 179,189,201,203,207,221,249,257,263,267,269,273,279,281,293,351,357,

%U 371,381,383,389,417,449,453,483,491,497,501,507,519,531,533,537,543,549

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

%H Vincenzo Librandi, <a href="/A109612/b109612.txt">Table of n, a(n) for n = 1..2000</a>

%e If n=3 then 44n = 443 which is a prime.

%e If n=81 then 44n = 4481 which is a prime.

%p a:= proc(n) local k; for k from 1 +`if`(n=1, 0, a(n-1))

%p while not isprime(parse(""||44||k)) do od; a(n):=k

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 30 2014

%t Select[Range[700], PrimeQ[44 10^IntegerLength[#] + #] &] (* _Vincenzo Librandi_, Jul 30 2014 *)

%o (Magma) [n: n in [1..600] | IsPrime(Seqint(Intseq(n) cat [4, 4])) ]; // _Vincenzo Librandi_, Jul 30 2014

%K nonn,base

%O 1,1

%A _Parthasarathy Nambi_, Aug 30 2005

%E More terms from _Vincenzo Librandi_, Mar 27 2010