|
|
A065850
|
|
Let u be any string of n digits from {0,...,8}; let f(u) = number of distinct primes, not beginning with 0, formed by permuting the digits of u; then a(n) = max_u f(u).
|
|
11
|
|
|
1, 2, 5, 11, 39, 161, 865, 4604, 22636, 161107, 840691
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(2)=2 because 12 and 21 (written in base 9) are primes (11 and 19).
|
|
MATHEMATICA
|
c[x_] := Module[{},
Length[Select[Permutations[x],
First[#] != 0 && PrimeQ[FromDigits[#, 9]] &]]];
Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 8], n],
Table[Count[#, i], {i, 0, 8}] &]]]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|