A065848 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).
1, 2, 5, 15, 45, 154, 674, 3575, 14946, 68308, 345653, 1931846, 9776107, 51415223, 311415054
Offset: 1
Examples
a(2)=2 because 14 and 41 (written in base 7) are primes (11 and 29). 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
Crossrefs
Programs
-
Mathematica
c[x_] := Module[{}, Length[Select[Permutations[x], First[#] != 0 && PrimeQ[FromDigits[#, 7]] &]]]; A065848[n_] := Module[{i}, Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 6], n], Table[Count[#, i], {i, 0, 6}] &]]]]]; Table[A065848[n], {n, 1, 7}] (* Robert Price, Mar 30 2019 *)
Extensions
2 more terms from Sean A. Irvine, Sep 06 2009
Definition corrected by David A. Corneth, Apr 23 2016
a(13) from Michael S. Branicky, May 28 2024
a(14) from Michael S. Branicky, Jun 25 2024
a(15) from Michael S. Branicky, Jul 08 2024