login
Numbers n such that 2.n.3.n.5.n.7.n.11 is prime (dot means concatenation).
5

%I #17 Apr 19 2021 01:07:39

%S 4,18,33,42,43,57,73,76,78,87,91,93,97,102,112,114,120,141,151,177,

%T 186,193,196,219,261,267,276,280,300,307,318,322,342,352,364,366,402,

%U 435,438,445,457,462,468,484,511,580,582,633,646,651,679,706,745,774,783

%N Numbers n such that 2.n.3.n.5.n.7.n.11 is prime (dot means concatenation).

%H Michael S. Branicky, <a href="/A083969/b083969.txt">Table of n, a(n) for n = 1..10000</a>

%e 2.4.3.4.5.4.7.4.11 = 2434547411, which is prime. Hence 4 is in the sequence.

%t v={};Do[If[PrimeQ[FromDigits[Join[{2}, IntegerDigits[n], {3}, IntegerDigits[n], {5}, IntegerDigits[n], {7}, IntegerDigits[n], {1, 1}]]], v=Append[v, n]], {n, 1000}];v

%t Select[Range[660], PrimeQ[FromDigits[Join[{2}, IntegerDigits[ # ], {3}, IntegerDigits[ # ], {5}, IntegerDigits[ # ], {7}, IntegerDigits[ # ], {1, 1}]]] &] (* _Stefan Steinerberger_, Jun 28 2007 *)

%o (Python)

%o from sympy import isprime

%o def aupton(terms):

%o n, alst = 1, []

%o while len(alst) < terms:

%o s = str(n)

%o t = int('2'+s+'3'+s+'5'+s+'7'+s+'11')

%o if isprime(t): alst.append(n)

%o n += 1

%o return alst

%o print(aupton(55)) # _Michael S. Branicky_, Apr 18 2021

%Y Cf. A083677, A032711, A092115, A092117.

%K base,easy,nonn

%O 1,1

%A _Farideh Firoozbakht_, Jun 19 2003

%E Edited by _Stefan Steinerberger_, Jun 28 2007

%E Edited by _N. J. A. Sloane_, Sep 18 2008 at the suggestion of _R. J. Mathar_