|
|
A295206
|
|
Number of primes that are permutations of the first 3*n - 2 numbers.
|
|
1
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The sequence would be a concatenation of chunks of the form {x, 0, 0}, where x is a value greater than zero, apart from the first term. Here only x's are listed.
|
|
LINKS
|
|
|
EXAMPLE
|
a(2) = 4 because for the first 4 numbers {1,2,3,4} we have 1423, 2143, 2341, 4231 that are prime.
|
|
MAPLE
|
with(combinat): P:=proc(q) local a, b, j, k, n, t; a:=[];
for n from 1 to q do a:=permute(3*n-2); t:=0;
for k from 1 to nops(a) do b:=0;
for j from 1 to nops(a[k]) do b:=10^(ilog10(a[k][j])+1)*b+a[k][j]; od;
if isprime(b) then t:=t+1; fi; od; print(t);
|
|
MATHEMATICA
|
Array[Count[Map[FromDigits@ Flatten[IntegerDigits@ #] &, Permutations[Range@ #, {#}]], _?PrimeQ] &, 10] (* Michael De Vlieger, Nov 17 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more,hard
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|