login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065843 Let u be any string of n digits from {0,1}; let f(u) = number of distinct primes, not beginning with 0, formed by permuting the digits of u; then a(n) = max_u f(u). 11
0, 1, 1, 2, 2, 3, 5, 12, 11, 24, 34, 79, 105, 194, 362, 734, 1143, 2045, 3872, 7758, 13001, 23902, 45539, 90436, 159510, 296210, 563833, 1110387, 2030754, 3876871, 7333827, 14353074, 26730538, 51246344, 97529176, 190928828 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..36.

EXAMPLE

a(4)=2 because 1011 and 1101 in base-2 notation are primes (11 and 13) and there is no set of three or more 4-digit primes with a common number of ones.

MAPLE

A065843 := proc(n)

    local b, u, udgs, uperm, a;

    b :=2 ;

    a := 0 ;

    for u from b^(n-1) to b^n-1 do

        udgs := convert(u, base, b) ;

        prs := {} ;

        for uperm in combinat[permute](udgs) do

            if op(-1, uperm) <> 0 then

                p := add( op(i, uperm)*b^(i-1), i=1..nops(uperm)) ;

                if isprime(p) then

                    prs := prs union {p} ;

                end if;

            end if;

        end do:

        a := max(a, nops(prs)) ;

    end do:

    a ;

end proc:

for n from 1 do

    print(n, A065843(n)) ;

end do: # R. J. Mathar, Apr 23 2016

MATHEMATICA

c[x_] := Module[{},

   Length[Select[Permutations[x],

     First[#] != 0 && PrimeQ[FromDigits[#, 2]] &]]];

A065843[n_] := Module[{i},

   Return[Max[Map[c, DeleteDuplicatesBy[Tuples[Range[0, 1], n],

       Table[Count[#, i], {i, 0, 1}] &]]]]];

Table[A065843[n], {n, 1, 19}] (* Robert Price, Mar 30 2019 *)

PROG

(PARI) lista(n) = {my(m = matrix(n, n), c); forprime(i=2, 2^n, b = binary(i); m[#b, hammingweight(b)]++); vector(n, i, vecmax(m[i, ]))} \\ David A. Corneth, Apr 23 2016

CROSSREFS

Cf. A065844 - A065853

Sequence in context: A005426 A014644 A089541 * A111264 A065994 A152446

Adjacent sequences:  A065840 A065841 A065842 * A065844 A065845 A065846

KEYWORD

base,nonn

AUTHOR

Sascha Kurz, Nov 24 2001

EXTENSIONS

6 more terms from Sean A. Irvine, Sep 06 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 20 23:20 EST 2020. Contains 331104 sequences. (Running on oeis4.)