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 n digits from {0,...,8}; let f(u) = number of distinct primes, not beginning with 0, formed by permuting the digits of u to a base-9 number; then a(n) = max_u f(u).
11

%I #31 Jul 09 2024 23:25:20

%S 1,2,5,11,39,161,865,4604,22636,161107,840691,4813328,29664164

%N 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 to a base-9 number; then a(n) = max_u f(u).

%e a(2)=2 because 12 and 21 (written in base 9) are primes (11 and 19).

%t c[x_] := Module[{},

%t Length[Select[Permutations[x],

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

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

%t Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 8], n],

%t Table[Count[#, i], {i, 0, 8}] &]]]]];

%t Table[A065850[n], {n, 1, 7}] (* _Robert Price_, Mar 30 2019 *)

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

%K base,more,nonn

%O 1,2

%A _Sascha Kurz_, Nov 24 2001

%E a(10)-a(11) from _Sean A. Irvine_, Sep 06 2009

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

%E a(12) from _Michael S. Branicky_, Jul 03 2024

%E a(13) from _Michael S. Branicky_, Jul 09 2024