login
A246718
a(n) is the number of different ways of concatenating the numbers {3^k, k=0,...,n} so as to produce a prime number.
0
2, 2, 3, 44, 128, 619, 4134, 28628, 229132, 2107538, 21438790, 238754555
OFFSET
1,1
COMMENTS
A PARI program distinct from that below was used to compute a(14) using four windows in under a month, but the value was lost.
It is neither trivial nor very difficult to establish that distinct permutations lead to distinct values.
EXAMPLE
The a(1)+a(2)+a(3)+a(4)=51 primes corresponding to the first four terms are, in increasing order, 13, 31, 139, 193, 12739, 19273, 32719, 1273981, 1278139, 1279813, 1381279, 1398127, 1812793, 1819273, 1927813, 2713981, 2718139, 2718193, 2731819, 2738119, 2738191, 2739181, 2781139, 2781193, 2781913, 2793181, 2793811, 2798113, 3127819, 3127981, 3192781, 3271981, 3279811, 3811279, 3812719, 3812791, 3912781, 3918127, 8113279, 8113927, 8119273, 8127319, 8131927, 8139127, 8193127, 9127813, 9181327, 9273181, 9327181, 9812731 and 9813127. Concatenations not shown, such as 931 = 7^2 * 19 and 1392781 = 13 * 107137, are all composite.
PROG
(PARI) a(n, v=vector(n+1, k, Str(3^(k-1))))=sum(k=1, (n+1)!, ispseudoprime(eval(concat(vecextract(v, numtoperm(n+1, k)))))) \\ M. F. Hasler, Jan 13 2015
CROSSREFS
Sequence in context: A083113 A184847 A354743 * A177764 A339402 A027498
KEYWORD
base,nonn
AUTHOR
James G. Merickel, Nov 15 2014
EXTENSIONS
Edited and verified up to n=9 by M. F. Hasler, Jan 13 2015
STATUS
approved