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.

A069603 a(1) = 2; a(n) = smallest number such that the juxtaposition a(1)a(2)...a(n) is a prime.

Original entry on oeis.org

2, 3, 3, 3, 3, 21, 17, 3, 13, 99, 17, 3, 7, 77, 19, 119, 7, 33, 29, 49, 149, 43, 23, 99, 9, 31, 57, 93, 29, 21, 91, 59, 31, 39, 87, 11, 121, 231, 279, 269, 51, 21, 313, 297, 527, 309, 27, 21, 67, 63, 431, 231, 13, 99, 407, 453, 69, 409, 189, 11, 31, 21, 23, 19, 93, 1143
Offset: 1

Views

Author

Amarnath Murthy, Mar 26 2002

Keywords

Examples

			a(6) = 21 and the number 2333321 is a prime.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Block[{k = 1, c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 67}] (* Robert G. Wilson v, Aug 05 2005 *)
  • Python
    from gmpy2 import is_prime
    from itertools import count, islice
    def agen(): # generator of terms
        an, s = 2, "2"
        while True:
            yield an
            an = next(k for k in count(3, 2) if is_prime(int(s+str(k))))
            s += str(an)
    print(list(islice(agen(), 66))) # Michael S. Branicky, May 11 2023

Extensions

More terms from Jason Earls, Jun 13 2002