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.

Previous Showing 11-13 of 13 results.

A160342 Smallest near-repdigit prime with digit n occurring n times, or 0 if no such prime exists.

Original entry on oeis.org

199, 223, 2333, 44449, 555557, 0, 77767777, 888888883, 9199999999
Offset: 1

Views

Author

Lekraj Beedassy, May 10 2009

Keywords

Comments

"Near-repdigit" in the definition means that all but one of the digits of the base-10 representation are the same.

Crossrefs

Cf. A105975-A105982, A069569, A164937 (near-repdigit primes).

Extensions

Corrected by Arkadiusz Wesolowski, Sep 23 2011

A316787 Semipermutable Primes: One-digit primes and primes with 2 or more digits such that all permutations of their digits are primes except for permutations that place either 5 or even numbers in the units digit.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 107, 113, 131, 149, 181, 199, 223, 227, 229, 241, 251, 277, 281, 283, 311, 337, 373, 401, 419, 421, 443, 449, 457, 461, 463, 467, 491, 503, 509, 521, 547, 557, 563, 569, 577, 587, 601, 607
Offset: 1

Views

Author

Enrique Navarrete, Jul 13 2018

Keywords

Comments

Supersequence of A003459. The motivation of the sequence is to fill gaps in A003459.
The sequence contains all 1-digit primes, 20 2-digit primes (i.e., all 2-digit primes except 19), as opposed to only 9 2-digit primes in A003459, and 66 3-digit primes (as opposed to only 9 3-digit primes in A003459).
Also, the sequence contains 4-digit primes such as 4441 but also nontrivial ones such as 1181, 1811, 8111, which form an orbit of size 3 (see below), while there are no 4-digit primes in A003459.
If we call orbits the primes that can be obtained by such permutations, there are orbits of sizes 1,2,3, and 4 up to 3-digit primes.
In fact, there are only 3 orbits of size 4 up to 3-digit primes: {107, 17, 71, 701}, {149, 419, 491, 941} and {709, 79, 97, 907}.
It appears that there are no orbits of sizes larger than 4 for n-digit primes.
Permutations that have leading 0's are included: thus 409 is not in the sequence because 49 is not prime. - Robert Israel, Aug 31 2018

Examples

			127 is not in the sequence since 271 is prime but neither 217 nor 721 are; to be in the sequence all of these numbers would have to be prime, and they would form an orbit of size 4 (by Name, permutations of these numbers ending in 2 are not considered).
241 and 421 are in the sequence and form an orbit of size 2 since these primes can be obtained by permutations that forbid the units digit to be an even number.
569 and 659 are in the sequence since these primes can be obtained by permutations that forbid the units digit to be either 5 or an even number.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,m,i,t;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      m:=nops(L);
      for i in select(t -> member(L[t],[1,3,7,9]), [$1..m]) do
        for t in combinat:-permute(subsop(i=NULL, L)) do
          if not isprime(L[i]+add(10^j*t[j],j=1..m-1)) then
            return false fi
      od od;
      true
    end proc:
    select(filter, [2,seq(i,i=3..2000,2)]); # Robert Israel, Aug 31 2018
  • Mathematica
    Select[Prime@Range[120], AllTrue[FromDigits /@ Permutations[IntegerDigits@ #], PrimeQ[#] || MemberQ[{0, 2, 4, 5, 6, 8}, Mod[#, 10]] &] &] (* Giovanni Resta, Jul 14 2018 *)

A160369 Largest base 10 near-repdigit (all but one digit alike) prime with digit n repeated n times (or 0, if no such prime exists).

Original entry on oeis.org

71, 229, 7333, 44449, 555557, 0, 77777747, 888888887, 9999999929
Offset: 1

Views

Author

Lekraj Beedassy, May 11 2009

Keywords

Comments

Each a(n) must be n + 1 digits long in base 10.
The different digit must not be 0, or else the near repdigit is divisible by n.
Our search is simplified by the fact that for even n, the different digit must be at the end. Furthermore, the different digit must be 1, 3, 7 or 9 (that is, not 5). In the case of n = 6, the choice of final digit is reduced further still to 1 or 7. 6666661 is divisible by 113, while 6666667 is divisible by 7. Therefore there is no term for a(6) and a 0 is entered instead. (The equivalent sequence for smallest prime near-repdigit would have a similar void for a(6)).
For odd n, the different digit may be placed at any position, but at least in verifying n = 7 and n = 9 it helped expedite the search to focus on near-repdigits with the different digit greater than n and placed as the most significant digit or near the most significant digit. For example, with n = 7, it was not necessary to look at a number like 76777777 since it's smaller than the term to be verified, 77777747.
The equivalent sequence in binary has only one term: 2!

Examples

			Near-repdigits with three 3s are 9333, 8333, 7333, 6333, ... 3933, 3833, etc. The largest of these, 9333, is obviously divisible by 3. Not as obviously, 8333 is divisible by 13 and 641. Then we see that 7333 is prime, therefore a(3) = 7333.
		

Crossrefs

Extensions

Terms verified by Alonso del Arte, Nov 19 2009
Previous Showing 11-13 of 13 results.