|
|
A065852
|
|
Let u be any string of 3 digits from {0,...,n-1}; let f(u) = number of distinct primes, not beginning with 0, formed by permuting the digits of u to a base-n number; then a(n) = max_u f(u).
|
|
11
|
|
|
1, 2, 3, 4, 4, 5, 3, 5, 4, 6, 4, 6, 4, 5, 5, 5, 4, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 5, 5, 6, 6, 6, 6, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
COMMENTS
|
a(n) = 6 for 73 <= n < 985, except a(192) = 5.
|
|
LINKS
|
|
|
EXAMPLE
|
a(2)=1 because 101 is prime and there are no two 3-digit primes with the same number of ones in base two.
|
|
MATHEMATICA
|
c[x_, n_] :=
Module[{},
Length[Select[Permutations[x],
First[#] != 0 && PrimeQ[FromDigits[#, n]] &]]];
Return[ Max[Map[c[#, n] &, DeleteDuplicatesBy[Tuples[Range[0, n - 1], 3], Table[Count[#, i], {i, 0, n - 1}] &]]]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|