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”).

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

%I #20 Jun 24 2024 15:31:40

%S 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,

%T 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,

%U 6,6,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6

%N 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).

%C a(n) = 6 for 73 <= n < 985, except a(192) = 5.

%e a(2)=1 because 101 is prime and there are no two 3-digit primes with the same number of ones in base two.

%t c[x_, n_] :=

%t Module[{},

%t Length[Select[Permutations[x],

%t First[#] != 0 && PrimeQ[FromDigits[#, n]] &]]];

%t A065852[n_] := Module[{i},

%t Return[ Max[Map[c[#, n] &, DeleteDuplicatesBy[Tuples[Range[0, n - 1], 3], Table[Count[#, i], {i, 0, n - 1}] &]]]]];

%t Table[A065852[n], {n, 2, 30}] (* _Robert Price_, Mar 30 2019 *)

%Y Cf. A065843, A065844, A065845, A065846, A065847, A065848, A065849, A065850, A065851, A065853.

%K base,nonn

%O 2,2

%A _Sascha Kurz_, Nov 24 2001

%E Definition corrected by _David A. Corneth_, Apr 23 2016