|
|
A065848
|
|
Let u be any string of n digits from {0,...,6}; 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, 15, 45, 154, 674, 3575, 14946, 68308, 345653, 1931846
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(2)=2 because 14 and 41 (written in base 7) are primes (11 and 29).
a(3)=5 because 124, 142, 214, 241 and 421 (in base 7) are primes (67, 79, 109, 127 and 211). R. J. Mathar, Apr 23 2016
|
|
MATHEMATICA
|
c[x_] := Module[{},
Length[Select[Permutations[x],
First[#] != 0 && PrimeQ[FromDigits[#, 7]] &]]];
Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 6], n],
Table[Count[#, i], {i, 0, 6}] &]]]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|