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.

Showing 1-5 of 5 results.

A235154 Primes which have one or more occurrences of exactly two different digits.

Original entry on oeis.org

13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 113, 131, 151, 181, 191, 199, 211, 223, 227, 229, 233, 277, 311, 313, 331, 337, 353, 373, 383, 433, 443, 449, 499, 557, 577, 599, 661, 677, 727, 733, 757, 773, 787, 797, 811
Offset: 1

Views

Author

Colin Barker, Jan 04 2014

Keywords

Comments

The first term having a repeated digit is 101.
a(3402) > 10^10.

Crossrefs

Programs

  • PARI
    s=[]; forprime(n=10, 1000, if(#vecsort(eval(Vec(Str(n))),,8)==2, s=concat(s, n))); s
    
  • PARI
    is(n)=isprime(n) && #Set(digits(n))==2 \\ Charles R Greathouse IV, Feb 23 2017
    
  • PARI
    \\ See Corneth link
    
  • Python
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations
    from itertools import count, islice, combinations_with_replacement, product
    def agen():
        for digits in count(2):
            s = set()
            for pair in product("0123456789", "1379"):
                if pair[0] == pair[1]: continue
                for c in combinations_with_replacement(pair, digits):
                    if len(set(c)) < 2 or sum(int(ci) for ci in c)%3 == 0:
                        continue
                    for p in multiset_permutations(c):
                        if p[0] == "0": continue
                        t = int("".join(p))
                        if isprime(t):
                            s.add(t)
            yield from sorted(s)
    print(list(islice(agen(), 100))) # Michael S. Branicky, Jan 23 2022

A062353 Primes of the form bbbbba... where a and b are digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 223, 227, 229, 331, 337, 443, 449, 557, 661, 773, 881, 883, 887, 991, 997, 1117, 2221, 3331, 4441, 4447, 5557, 6661, 8887, 11113, 11117, 11119, 22229
Offset: 1

Views

Author

Amarnath Murthy, Jun 23 2001

Keywords

Comments

Number of terms of n digits: 4, 21, 16, 8, 9, 8, 2, 8, 7, 3, 4, 5, 2, 2, 4, 0, 3, 4, 2, 3, 2, 2, 4, 1, 0, ..., . - Robert G. Wilson v, May 29 2011

Examples

			4441 is a member where a=1 and b = 4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Select[ Union@ Flatten@ Table[ FromDigits@ Join[ Table[b, {n - 1}], {a}], {b, 9}, {a, {1, 3, 7, 9}}], PrimeQ]; f[1] = {2, 3, 5, 7}; Array[f, 5] // Flatten (* Robert G. Wilson v, May 29 2011 *)
  • PARI
    print1("2, 3, 5, 7");for(n=2,20,forstep(k=10^n\9-1,10^n-9,10^n\9-1,for(m=k+1,k+9,if(isprime(m),print1(", "m))))) \\ Charles R Greathouse IV, May 29 2011

Extensions

More terms from Jason Earls, Jun 26 2001
Corrected and extended by Dean Hickerson, Jul 10 2001

A061022 Primes of the form abbbbb... where a and b are digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 199, 211, 233, 277, 311, 433, 499, 577, 599, 677, 733, 811, 877, 911, 977, 1777, 1999, 2111, 2333, 2777, 2999, 4111, 4999, 5333, 7333, 8111, 8999, 23333, 47777
Offset: 1

Views

Author

Amarnath Murthy, Jun 23 2001

Keywords

Comments

Number of terms of n digits: 4, 21, 15, 12, 7, 8, 2, 7, 2, 3, 5, 2, 2, 7, 2, 4, 2, 2, 4, 3, 1, 0, 3, 3, 0, ..., . - Robert G. Wilson v, May 29 2011

Examples

			4111 is a member where a=4 and b = 1.
		

Crossrefs

Programs

  • Maple
    N:= 20:
    A:= 2,3,5,7:
    for n from 2 to N do
      for a from 1 to 9 do
        for b in [1,3,7,9] do
           p:= a*10^(n-1) + b*(10^(n-1)-1)/9;
           if isprime(p) then A:= A,p fi
        od
      od
    od:
    A;  # Robert Israel, Oct 13 2014
  • Mathematica
    f[n_] := Select[ Union@ Flatten@ Table[ FromDigits@ Join[{a}, Table[b, {n - 1}]], {a, 9}, {b, {1, 3, 7, 9}}], PrimeQ]; Array[f, 5] // Flatten (* Robert G. Wilson v, May 29 2011 *)
  • PARI
    { n=r=0; default(primelimit, 1777777777); forprime (p=2, 1777777777, if (p>100, r=p\10; d=p-r*10; while (r>9 && r-r\10*10 == d, r\=10)); if (r<=9, write("b061022.txt", n++, " ", p)) ) } \\ Harry J. Smith, Jul 16 2009

Extensions

Corrected and extended by Dean Hickerson, Jul 10 2001

A385481 Primes whose decimal expansion consists of the concatenation of ij, iijj, iiijjj,..., and m i’s followed by m j’s, i != j, where 1<= i, j <= 9 and m > 0.

Original entry on oeis.org

13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 31331133311133331111, 37337733377733337777, 43443344433344443333, 49449944499944449999
Offset: 1

Views

Author

Gonzalo Martínez, Jun 30 2025

Keywords

Comments

a(25) has 812 digits and starts with 292299222999...999, where the last concatenated strings have 28 2's followed by 28 9's.
Since each term is prime, then j = 1, 3, 7, and 9 and i + j == 1, 2 (mod 3).
m == 1 (mod 3). Proof. If k is a term whose last concatenated string has m i's followed by m j's, then it has 2(1 + 2 + ... + m) = m(m + 1) digits, whose sum is (i + j)*m(m + 1)/2, so that if m == 0, 2 (mod 3), then the sum of digits of k is a multiple of 3 and so k is not prime.
Are there infinite primes of this form?
From Michael S. Branicky, Jul 01 2025: (Start)
A probabilistic argument suggests the sequence is finite.
a(26), if it exists, has m > 321 and > 103362 digits. (End)

Examples

			for i = 3, j = 1 and m = 4, by concatenating 31, 3311, 333111, 33331111 the prime 31331133311133331111 is obtained.
		

Crossrefs

Programs

  • Python
    from gmpy2 import is_prime, mpz
    from itertools import count, islice, product
    def agen(): yield from (p for m in count(1) for i in "123456789" for j in "1379" if i != j and is_prime(p:=int(mpz("".join(i*k+j*k for k in range(1, m+1))))))
    print(list(islice(agen(), 24))) # Michael S. Branicky, Jun 30 2025

A385637 Primes whose decimal expansion consists of the concatenation of m i’s followed by m j’s, ..., iiijjj, iijj and ij, i != j, where 1 <= i, j <= 9 and m > 0.

Original entry on oeis.org

13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 44443333444333443343, 55555553333333555555333333555553333355553333555333553353
Offset: 1

Views

Author

Gonzalo Martínez, Jul 05 2025

Keywords

Comments

Similar to A385481, but the blocks of i's and j's are concatenated from longest length to shortest, where a(n) contains terms of a length not recorded in A385481, such as length 56, 182 and 272.
a(23) has 182 digits and starts with 13 2's followed by 13 9's.
a(24) has 272 digits and starts with 16 9's followed by 16 7's.
a(25), if it exists, has m > 200 and > 40200 digits.

Examples

			For i = 4, j = 3 and m = 4, by concatenating 44443333, 444333, 4433 and 43 the prime 44443333444333443343 is obtained.
		

Crossrefs

Showing 1-5 of 5 results.