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.

A228324 Primes arising from A228323 in order of their appearance.

This page as a plain text file.
%I A228324 #14 Oct 18 2022 01:28:58
%S A228324 13,23,29,59,521,421,47,67,613,1013,1019,1619,1627,827,811,1511,1523,
%T A228324 1223,1217,2017,2029,1429,1433,2633,2647,1847,1831,2531,2539,2239,
%U A228324 2237,2437,2441,3041,3049,3449,3457,2857,2843,3643,3659,3259,3251,3851,3853,4253
%N A228324 Primes arising from A228323 in order of their appearance.
%D A228324 Eric Angelini, Posting to the Sequence Fans Mailing List, Aug 14 2013.
%H A228324 Michael S. Branicky, <a href="/A228324/b228324.txt">Table of n, a(n) for n = 1..10000</a>
%H A228324 <a href="/index/Pri#piden">Index entries for primes involving decimal expansion of n</a>
%o A228324 (Python)
%o A228324 from sympy import isprime
%o A228324 from itertools import islice
%o A228324 def c(s, t):
%o A228324     u, v = int(s+t), int(t+s)
%o A228324     if isprime(u): return u
%o A228324     if isprime(v): return v
%o A228324     return False
%o A228324 def agen():
%o A228324     aset, k, mink = set(), 1, 2
%o A228324     while True:
%o A228324         an = k; aset.add(an); s, k = str(an), mink
%o A228324         while k in aset or not c(s, str(k)): k += 1
%o A228324         while mink in aset: mink += 1
%o A228324         yield c(s, str(k))
%o A228324 print(list(islice(agen(), 46))) # _Michael S. Branicky_, Oct 17 2022
%Y A228324 Cf. A228323.
%K A228324 nonn,base
%O A228324 1,1
%A A228324 _N. J. A. Sloane_, Aug 20 2013
%E A228324 More terms from _Alois P. Heinz_, Aug 20 2013