|
|
A065849
|
|
Let u be any string of n digits from {0,...,7}; let f(u) = number of distinct primes, not beginning with 0, formed by permuting the digits of u to a base-8 number; then a(n) = max_u f(u).
|
|
11
|
|
|
1, 2, 3, 11, 23, 113, 425, 1912, 11872, 57918, 303157, 1757094, 9777949, 59129172
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(2)=2 because 15 and 51 (written in base 8) are primes (13 and 41).
a(3)=3 because 531, 351 and 513 (in base 8) are primes (107, 233, 331), or 145, 415 and 541 (in base 8) are primes (101, 269, 353), or 147, 417 and 471 are primes (103, 271, 313) etc. - R. J. Mathar, Apr 23 2016
|
|
MATHEMATICA
|
c[x_] := Module[{},
Length[Select[Permutations[x],
First[#] != 0 && PrimeQ[FromDigits[#, 8]] &]]];
Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 7], n],
Table[Count[#, i], {i, 0, 7}] &]]]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|