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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A039986 Primes such that every distinct permutation of digits is composite (including permutations with leading zeros). 4
 2, 3, 5, 7, 11, 19, 23, 29, 41, 43, 47, 53, 59, 61, 67, 83, 89, 151, 211, 223, 227, 229, 233, 257, 263, 269, 353, 383, 409, 431, 433, 443, 449, 487, 499, 523, 541, 557, 599, 661, 677, 773, 827, 829, 853, 859, 881, 883, 887, 929, 997, 1447, 1451, 1481, 2111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS At most one permutation of digits of A179239 can occur in this sequence. - David A. Corneth, Jun 28 2018 Is there a term with more than 4 distinct digits? - David A. Corneth, Jun 30 2018 Up through 9999991 (the largest 7-digit prime) there are no terms with more than 4 distinct digits. - Harvey P. Dale, Dec 12 2018 The sequence can be seen as a table with the n-digit terms in row n. Row lengths would then be (4, 13, 34, 45, 68, 67, 47, 36, 40, 46, 33, 45, 35, 38, 32, ...). In these rows there are (0, 0, 0, 6, 9, 3, 0, 1, 0, 0, ...) terms with >= 4 distinct digits: this seems to happen only for terms with 4, 5, 6 or 8 digits. I conjecture that there are no more than these 6 + 9 + 3 + 1 = 19 terms (2861, 4027, 4801, 5209, 5623, 5849, 24889, 26561, 40609, 40883, 66541, 66853, 85087, 85843, 86441, 288689, 442469, 558541, 55555429) with 4, and none with 5 or more distinct digits. - M. F. Hasler, Jul 01 2018 Prime repunits (A004022) are a subset of this sequence. As larger terms are seemingly all near-repdigit primes, it is possible to obtain very large terms. For example: (10^10002 - 1)/9 - 10^2872. - Hans Havermann, Jul 08 2018 LINKS Hans Havermann and M. F. Hasler, Table of n, a(n) for n = 1..1141 (Terms < 10^30; earlier terms from T. D. Noe and David A. Corneth.) Hans Havermann, AEnlic primes. MAPLE with(combinat): P:=proc(n) local a, b, c, d, j, k, t, x; x:=ithprime(n); a:=permute(convert(x, base, 10)); b:=ilog10(x)+1; d:=0; for k from 1 to nops(a) do c:=0; for j from 1 to b do c:=10*c+a[k][j]; od; if not isprime(c) then d:=d+1; fi; od; if d=nops(a)-1 then x; fi; end: seq(P(i), i=1..330); # Paolo P. Lava, Jun 29 2018 MATHEMATICA t = {}; Do[p=Prime[n]; If[Length[Select[Table[FromDigits[k], {k, Permutations[IntegerDigits[p]]}], PrimeQ]] == 1, AppendTo[t, p]], {n, 330}]; t (* Jayanta Basu, May 07 2013 *) Select[Prime[Range[400]], AllTrue[FromDigits/@Rest[ Permutations[ IntegerDigits[#]]], CompositeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 22 2015 *) PROG (PARI) is(n, d=digits(n))={isprime(n)&&!for(i=1, (#d)!, (n=vecextract(d, numtoperm(#d, i)))!=d&& isprime(fromdigits(n))&& return)} \\ Then: select(is, primes(500)) - M. F. Hasler, Jun 28 2018 is(n)={isprime(n)||return; my(d=vecsort(digits(n), (a, b)->if(a-b&& t=bittest(650, a)-bittest(650, b), t, a-b)), p=vector(#d, i, i), N(p, i=2)= while((t=p[i]-1)&& while((setsearch(Set(p[i+1..#p]), t)|| d[t]==d[p[i]])&& t--, ); !t, i++>#p&& return); i<#p|| bittest(650, d[t])|| return; concat([setminus(Set(p[1..i]), [t]), t, p[i+1..#p]]), t); #d==1|| !until(!p=N(p), (n!=t=fromdigits(vecextract(d, p)))&& isprime(t)&& return)} \\ Produces only inequivalent permutations which can be prime. - M. F. Hasler, Jun 28 2018 A039986_row(n)={if(n>1, local(D=eval(Vec("0245681379")), u=vectorv(n, i, 10^(n-i)), nextperm()=for(i=2, n, (t=p[i]-1)&& while(setsearch(Set(p[i+1..n]), t)|| d[t]==d[p[i]], t--||break); t|| next; i

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.

Last modified May 28 21:37 EDT 2020. Contains 334690 sequences. (Running on oeis4.)