login
Primes whose base-9 representation also is the base-7 representation of a prime.
2

%I #13 Nov 02 2023 11:07:19

%S 2,3,5,13,23,29,37,47,59,103,109,131,167,173,181,199,211,263,283,379,

%T 419,509,541,733,787,821,859,911,919,983,1013,1063,1091,1093,1171,

%U 1487,1499,1543,1549,1559,1567,1571,1667,1669,1733,1783,1787,1913,1993,2237,2287,2351,2381,2477,2621

%N Primes whose base-9 representation also is the base-7 representation of a prime.

%C This sequence is part of the two-dimensional array of sequences based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.

%H Robert Price, <a href="/A235621/b235621.txt">Table of n, a(n) for n = 1..14672</a>

%H M. F. Hasler, <a href="https://docs.google.com/document/d/10IM7fcAbB2tqRGuwfGvuEGUzD_IXbgXPDK0tfxN4M3o/pub">Primes whose base c expansion is also the base b expansion of a prime</a>

%e E.g., 13 = 14_9 and 14_7 = 11 are both prime.

%o (PARI) is(p,b=7,c=9)=vecmax(d=digits(p,c))<b&&isprime(vector(#d,i,b^(#d-i))*d~)&&isprime(p)

%o (PARI) forprime(p=1,3e3,is(p,9,7)&&print1(vector(#d=digits(p,7),i,9^(#d-i))*d~,",")) \\ To produce the terms, this is more efficient than to select them using straightforwardly is(.)=is(.,7,9)

%Y Cf. A231479, A235265, A235266, A152079, A235461 - A235482, A065720 - A065727, A235394, A235395, A089971 ⊂ A020449, A089981, A090707 - A091924, A235615 - A235639. See the LINK for further cross-references.

%K nonn,base

%O 1,1

%A _M. F. Hasler_, Jan 13 2014