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.

A065850 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).

Original entry on oeis.org

1, 2, 5, 11, 39, 161, 865, 4604, 22636, 161107, 840691, 4813328, 29664164
Offset: 1

Views

Author

Sascha Kurz, Nov 24 2001

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    c[x_] := Module[{},
       Length[Select[Permutations[x],
         First[#] != 0 && PrimeQ[FromDigits[#, 9]] &]]];
    A065850[n_] := Module[{i},
       Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 8], n],
           Table[Count[#, i], {i, 0, 8}] &]]]]];
    Table[A065850[n], {n, 1, 7}] (* Robert Price, Mar 30 2019 *)

Extensions

a(10)-a(11) from Sean A. Irvine, Sep 06 2009
Definition corrected by David A. Corneth, Apr 23 2016
a(12) from Michael S. Branicky, Jul 03 2024
a(13) from Michael S. Branicky, Jul 09 2024