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.

A074346 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 A074346 #14 Oct 15 2021 11:29:25
%S A074346 10,13,23,49,111,113,171,211,293,309,333,387,463,479,513,687,933,973,
%T A074346 993,1329,1433,1449,1551,2071,2271,2423,2587,2621,2659,2757,2771,2911,
%U A074346 3081,3243,3279,3671,4243,4247,4371,4453,4511,5229,6097,6177,6293,6571
%N A074346 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 A074346 Michael S. Branicky, <a href="/A074346/b074346.txt">Table of n, a(n) for n = 1..439</a>
%t A074346 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 A074346 (Python)
%o A074346 from sympy import isprime
%o A074346 def aupton(terms):
%o A074346     alst, astr = [10], "10"
%o A074346     while len(alst) < terms:
%o A074346         k = alst[-1] + 1 + (alst[-1]%2)
%o A074346         while not isprime(int(astr+str(k))): k += 2
%o A074346         alst.append(k)
%o A074346         astr += str(k)
%o A074346     return alst
%o A074346 print(aupton(46)) # _Michael S. Branicky_, Oct 13 2021
%Y A074346 Cf. A111524, A111525, A074336.
%Y A074346 Cf. A074338, A074339, A074340, A074341, A074342, A074343, A074344, A074345.
%K A074346 nonn,base
%O A074346 1,1
%A A074346 _Zak Seidov_, Sep 23 2002
%E A074346 More terms from _Robert G. Wilson v_, Aug 05 2005