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.

A220627 Prime numbers that are not Brazilian.

Original entry on oeis.org

2, 3, 5, 11, 17, 19, 23, 29, 37, 41, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 151, 163, 167, 173, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 293, 311, 313, 317
Offset: 1

Views

Author

Bernard Schott, Dec 17 2012

Keywords

Comments

These are primes not in A085104 (Brazilian primes).
Primes that are not repunit in any base b >= 2 with three or more digits.

Crossrefs

Cf. A085104.

Programs

  • Mathematica
    brazBases[n_] := Select[Range[2, n - 2], Length[Union[IntegerDigits[n, #]]] == 1 &]; Select[Range[2, 1000], PrimeQ[#] && brazBases[#] == {} &] (* T. D. Noe, Dec 26 2012 *)
  • PARI
    isok(p) = {if (isprime(p), for (b=2, p-1, my(d=digits(p, b), md=vecmin(d)); if ((#d > 2) && (md == 1) && (vecmax(d) == 1), return (0));); return (1););} \\ Michel Marcus, Apr 30 2021
  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import isprime, primerange
    def B(n):
        l=[]
        for b in range(2, n - 1):
            d=digits(n, b)[1:]
            if max(d)==min(d): l.append(n)
        return l
    print([n for n in primerange(2, 1001) if not B(n)]) # Indranil Ghosh, Jun 22 2017