login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A168110 Palindromic primes in base 8 which are also emirps (A006567) in base 10. 1

%I #10 Feb 22 2019 02:04:47

%S 73,97,113,12547,12611,13259,13523,14107,14563,14891,15667,15731,

%T 30367,31799,31991,312073,318281,350033,359377,366169,371353,372377,

%U 383833,392153,393761,397921,792131,796291,936227,936739,948707,966379,992947,1005427,1008563,1029883,1043899,1048571,1311749,1313797,1340357,1358029

%N Palindromic primes in base 8 which are also emirps (A006567) in base 10.

%C What is a good way in the OEIS to show other such pairs of bases analogous to this?

%F A029976 INTERSECTION A006567.

%e a(1) = 73 because 73 (base 8) = 111 (which is a palindrome), and R(73) = 37 which is a different prime (base 10). a(2) = 97 because 97 (base 8) = 141 (which is a palindrome), and R(97) = 79 which is a different prime (base 10). a(3) = 113 because 113 (base 8) = 161 (which is a palindrome), and R(113) = 311 which is a different prime (base 10). a(4) = 12547 because 12547 (base 8) = 30403 (which is a palindrome), and R(12547) = 74521 which is a different prime (base 10).

%p isA006567 := proc(p) local r; if isprime(p) then r := digrev(p) ; r <> p and isprime(r) ; else false; end if; end proc: isA029803 := proc(n) local dgs,d; dgs := convert(n,base,8) ; for d from 1 to nops(dgs)/2 do if op(d,dgs) <> op(-d,dgs) then return false; end if; end do ; return true; end proc: isA029976 := proc(n) isprime(n) and isA029803(n) ; end proc: isA168110 := proc(p) isA029976(p) and isA006567(p) ; end proc: A168110 := proc(n) option remember ; local a; if n = 1 then 73 ; else a := nextprime(procname(n-1)) ; while not isA168110(a) do a := nextprime(a) ; end do ; return a; end if; end proc: seq(A168110(n),n=1..30) ; # _R. J. Mathar_, Dec 06 2009

%t okQ[n_]:=Module[{fridn=FromDigits[Reverse[IntegerDigits[n]]], idn8= IntegerDigits[n,8]}, fridn!=n&&PrimeQ[fridn]&&idn8==Reverse[idn8]]; Select[Prime[Range[75000]],okQ] (* _Harvey P. Dale_, Aug 10 2011 *)

%Y Cf. A000040, A004086, A006567, A007094, A029976.

%K base,nonn

%O 1,1

%A _Jonathan Vos Post_, Nov 18 2009

%E Terms beyond a(10) by _R. J. Mathar_, Dec 06 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:21 EDT 2024. Contains 371254 sequences. (Running on oeis4.)