Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Jan 16 2022 23:26:48
%S 2,3,11,23,29,31,41,71,79,101,109,113,137,149,157,163,191,199,239,251,
%T 263,269,283,307,353,397,401,431,443,521,547,601,701,709,743,751,773,
%U 853,887,941,947,983,1013,1039,1049,1069,1109,1151,1217,1283,1303,1487,1489,1663,1669,1789,1823,1901,1949,1973
%N Primes whose base-4 representation is also the base-7 representation of a prime.
%C This sequence is part of a two-dimensional array of sequences, given in the LINK, 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 Israel, <a href="/A235634/b235634.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 E.g., 11 = 23_4 and 23_7 = 17 both are prime.
%p filter:= proc(n) local L,m;
%p if not isprime(n) then return false fi;
%p L:= convert(n,base,4);
%p isprime(add(L[i]*7^(i-1),i=1..nops(L)));
%p end proc:
%p select(filter, [2,seq(i,i=3..10000,2)]); # _Robert Israel_, Jul 02 2018
%o (PARI) is(p,b=7,c=4)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.
%Y Cf. A235617, 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