OFFSET
1,1
COMMENTS
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.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
5 = 11_4 and 11_2 = 3 are both prime, so 5 is a term.
17 = 101_4 and 101_2 = 5 are both prime, so 17 is a term.
PROG
(PARI) is(p, b=2, c=4)=vecmax(d=digits(p, c))<b&&isprime(vector(#d, i, b^(#d-i))*d~)&&isprime(p)
(Python)
from itertools import islice
from sympy import nextprime, isprime
def A235461_gen(): # generator of terms
p = 1
while (p:=nextprime(p)):
if isprime(m:=int(bin(p)[2:], 4)):
yield m
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Jan 11 2014
EXTENSIONS
a(37)-a(40) from Robert Price, Nov 01 2023
STATUS
approved