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.

A111524 a(1) = 10; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.

This page as a plain text file.
%I A111524 #15 Oct 13 2021 08:39:18
%S A111524 10,13,23,49,111,113,171,211,293,309,309,469,639,759,951,1037,1057,
%T A111524 1083,1257,1269,1287,1341,1551,1637,1677,1981,1989,2021,2059,2357,
%U A111524 2583,2697,2967,3289,6789,7073,7323,7369,7463,7501,7709,7869,8029,8069,8077,8519
%N A111524 a(1) = 10; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.
%H A111524 Michael S. Branicky, <a href="/A111524/b111524.txt">Table of n, a(n) for n = 1..449</a>
%t A111524 a[1] = 10; a[n_] := a[n] = Block[{k = a[n - 1] + 1 + Mod[a[n - 1], 2], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k += 2]; k]; Table[ a[n], {n, 46}] (* _Robert G. Wilson v_, Aug 05 2005 *)
%o A111524 (Python)
%o A111524 from sympy import isprime
%o A111524 def aupton(terms):
%o A111524     alst, astr = [10], "10"
%o A111524     while len(alst) < terms:
%o A111524         k = alst[-1] + (1 - alst[-1]%2)
%o A111524         while not isprime(int(astr+str(k))): k += 2
%o A111524         alst.append(k)
%o A111524         astr += str(k)
%o A111524     return alst
%o A111524 print(aupton(46)) # _Michael S. Branicky_, Oct 13 2021
%Y A111524 Cf. A111525, A074346, A033680, A033679, A033681.
%Y A111524 Cf. A046254, A046255, A046256, A046257, A046258, A046259.
%K A111524 base,nonn
%O A111524 1,1
%A A111524 _Patrick De Geest_, _Zak Seidov_ and _Robert G. Wilson v_, Aug 05 2005