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.

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