OFFSET
2,1
EXAMPLE
a(2)=2 because 1101 and 1011 are primes and there are no three 4-digit primes with the same number of ones in base 2.
MATHEMATICA
c[x_, n_] :=
Module[{},
Length[Select[Permutations[x],
First[#] != 0 && PrimeQ[FromDigits[#, n]] &]]];
A065853[n_] := Module[{i},
Return[ Max[Map[c[#, n] &,
DeleteDuplicatesBy[Tuples[Range[0, n - 1], 4],
Table[Count[#, i], {i, 0, n - 1}] &]]]]];
Table[A065853[n], {n, 2, 20}] (* Robert Price, Mar 30 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Sascha Kurz, Nov 24 2001
EXTENSIONS
Definition corrected by David A. Corneth, Apr 23 2016
STATUS
approved