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

%I #34 Jul 08 2024 10:38:56

%S 1,2,5,15,45,154,674,3575,14946,68308,345653,1931846,9776107,51415223,

%T 311415054

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

%e a(2)=2 because 14 and 41 (written in base 7) are primes (11 and 29).

%e 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

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

%t Length[Select[Permutations[x],

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

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

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

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

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

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

%K base,more,nonn

%O 1,2

%A _Sascha Kurz_, Nov 24 2001

%E 2 more terms from _Sean A. Irvine_, Sep 06 2009

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

%E a(13) from _Michael S. Branicky_, May 28 2024

%E a(14) from _Michael S. Branicky_, Jun 25 2024

%E a(15) from _Michael S. Branicky_, Jul 08 2024