OFFSET

1,1

EXAMPLE

a(5) = 112573 is a concatenation of 11,2,5,7 and 3 and is the smallest such prime.

a(7) <= 1113223537 = 11//13//2//23//5//3//7. - R. J. Mathar, Mar 19 2011

a(8) <= 111317193257 = 11//13//17//19//3//2//5//7. - Jonathan Vos Post, Mar 20 2006

a(9) <= 11131719223357 = 11//13//17//19//2//23//3//5//7. - R. J. Mathar, Mar 19 2011

PROG

(Sage)

concat = lambda x: Integer(''.join(str(i) for i in x), base=10)

def A083427(n):

def primelists(sofar, widths):

if not widths: yield sofar; return

w = widths[0]

for p in prime_range(10**(w-1), 10**w):

if p not in sofar:

for pv in primelists(sofar+[p], widths[1:]):

yield pv

for numdig in PositiveIntegers():

least = None

for part in Partitions(numdig, length=n):

if list(part).count(1) > 4: continue # optimization

for sizes in Permutations(part):

for plist in primelists([], sizes):

x = concat(plist)

if is_prime(x): least = min(x, least) if least else x

# since x is increasing in this inner loop,

# no need to continue if we can't improve

if least and x >= least: break

if least: return least # D. S. McNeil, Mar 20 2011

CROSSREFS

KEYWORD

base,more,nonn

AUTHOR

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 29 2003

EXTENSIONS

a(7), a(8) from Jonathan Vos Post, Mar 20 2006

a(7) corrected by Emmanuel Vantieghem, Mar 19 2011

a(8) deleted on grounds that it is quite likely to be wrong. - N. J. A. Sloane, Mar 19 2011

a(7)-a(15) from D. S. McNeil, Mar 20 2011

STATUS

approved