login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A295206
Number of primes that are permutations of the first 3*n - 2 numbers.
1
0, 4, 534, 222864, 284197799
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.
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);
od; end: P(5); # Paolo P. Lava, Nov 17 2017
MATHEMATICA
Array[Count[Map[FromDigits@ Flatten[IntegerDigits@ #] &, Permutations[Range@ #, {#}]], _?PrimeQ] &, 10] (* Michael De Vlieger, Nov 17 2017 *)
CROSSREFS
Sequence in context: A350613 A152218 A152463 * A209608 A159367 A012770
KEYWORD
nonn,base,more,hard
AUTHOR
Paolo P. Lava, Nov 17 2017
EXTENSIONS
a(4)-a(5) from Giovanni Resta, Nov 17 2017
STATUS
approved