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.

A068801 Primes that can be formed by concatenating 2^a and 3^b.

This page as a plain text file.
%I A068801 #7 Aug 17 2022 16:11:59
%S A068801 11,13,19,23,29,41,43,83,89,127,163,181,227,281,641,643,827,881,1283,
%T A068801 1289,1627,2243,2729,4243,4729,6427,6481,8243,10243,16561,16729,20483,
%U A068801 26561,40961,42187,81929,86561,102481,163841,166561,219683,326561,327689,859049
%N A068801 Primes that can be formed by concatenating 2^a and 3^b.
%H A068801 Michael S. Branicky, <a href="/A068801/b068801.txt">Table of n, a(n) for n = 1..8482</a>
%e A068801 8243 is a concatenation of 2^3 and 3^5. 10242187 is a term as a concatenation of 1024 (=2^10) and 2187(=3^7).
%o A068801 (Python)
%o A068801 from sympy import isprime
%o A068801 from itertools import count, takewhile
%o A068801 def auptod(digits):
%o A068801     M = 10**digits
%o A068801     pows2 = list(takewhile(lambda x: x < M , (2**a for a in count(0))))
%o A068801     pows3 = list(takewhile(lambda x: x < M , (3**b for b in count(0))))
%o A068801     strs2, strs3 = list(map(str, pows2)), list(map(str, pows3))
%o A068801     concat = (int(s2+s3) for s2 in strs2 for s3 in strs3)
%o A068801     return sorted(set(t for t in concat if t < M and isprime(t)))
%o A068801 print(auptod(6)) # _Michael S. Branicky_, Aug 17 2022
%Y A068801 Cf. A068712, A068714.
%K A068801 base,nonn
%O A068801 1,1
%A A068801 _Amarnath Murthy_, Mar 05 2002
%E A068801 Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 25 2002
%E A068801 a(43) and beyond from _Michael S. Branicky_, Aug 17 2022