%I #19 Nov 01 2023 20:10:14
%S 5,17,257,277,337,1093,1109,1297,1361,4357,5189,16453,16657,16661,
%T 17489,17669,17681,17749,21521,21569,21589,65537,65557,65617,65809,
%U 66821,70657,70981,70997,81937,82241,83221,83269,86017,86357,87317,263429,263489,267541,278549
%N Primes whose base-4 representation also is the base 2-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.
%C For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
%C When the smaller base is b=2 such that only digits 0 and 1 are allowed, these are primes that are the sum of distinct powers of the larger base, here c=4, thus a subsequence of A077718 and therefore also of A000695, the Moser-de Bruijn sequence.
%H Alois P. Heinz, <a href="/A235461/b235461.txt">Table of n, a(n) for n = 1..10000</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 5 = 11_4 and 11_2 = 3 are both prime, so 5 is a term.
%e 17 = 101_4 and 101_2 = 5 are both prime, so 17 is a term.
%o (PARI) is(p,b=2,c=4)=vecmax(d=digits(p,c))<b&&isprime(vector(#d,i,b^(#d-i))*d~)&&isprime(p)
%o (Python)
%o from itertools import islice
%o from sympy import nextprime, isprime
%o def A235461_gen(): # generator of terms
%o p = 1
%o while (p:=nextprime(p)):
%o if isprime(m:=int(bin(p)[2:],4)):
%o yield m
%o A235461_list = list(islice(A235461_gen(),20)) # _Chai Wah Wu_, Aug 21 2023
%Y Cf. A090707 - A091924, A235462 - A235482. See the LINK for further cross-references.
%K nonn,base
%O 1,1
%A _M. F. Hasler_, Jan 11 2014
%E a(37)-a(40) from _Robert Price_, Nov 01 2023
|