cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065853 Let u be any string of 4 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).

This page as a plain text file.
%I A065853 #15 Jun 23 2024 21:42:45
%S A065853 2,4,6,7,8,15,11,11,11,15,15,19,11,14,15,14,11,16,13,18,14,14,14,16,
%T A065853 13,16,15,17,13,16,14,15,17,16,15,16,14,17,14,17,16,17,14,16,15,15,14,
%U A065853 17,17,16,16,16,15,18,16,17,14,15,14,16,15,15,16,16,17,17,13,17,15,17,13
%N A065853 Let u be any string of 4 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).
%e A065853 a(2)=2 because 1101 and 1011 are primes and there are no three 4-digit primes with the same number of ones in base 2.
%t A065853 c[x_, n_] :=
%t A065853   Module[{},
%t A065853    Length[Select[Permutations[x],
%t A065853      First[#] != 0 && PrimeQ[FromDigits[#, n]] &]]];
%t A065853 A065853[n_] := Module[{i},
%t A065853    Return[ Max[Map[c[#, n] &,
%t A065853       DeleteDuplicatesBy[Tuples[Range[0, n - 1], 4],
%t A065853        Table[Count[#, i], {i, 0, n - 1}] &]]]]];
%t A065853 Table[A065853[n], {n, 2, 20}] (* _Robert Price_, Mar 30 2019 *)
%Y A065853 Cf. A065843, A065844, A065845, A065846, A065847, A065848, A065849, A065850, A065851, A065852.
%K A065853 base,nonn
%O A065853 2,1
%A A065853 _Sascha Kurz_, Nov 24 2001
%E A065853 Definition corrected by _David A. Corneth_, Apr 23 2016