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!)
A236365 Primes whose binary and octal representation are also prime when read in decimal. 6

%I #12 May 30 2018 13:39:23

%S 3,5,89,179,199,367,383,443,523,659,947,1097,1163,1289,1483,1753,2351,

%T 2423,2903,3041,3217,3299,3631,4729,4951,5119,5347,5879,6007,6131,

%U 6491,6911,7547,7577,7649,8167,8849,9241,9511,9817,9929,10303,10831,11251,11527

%N Primes whose binary and octal representation are also prime when read in decimal.

%H K. D. Bajpai, <a href="/A236365/b236365.txt">Table of n, a(n) for n = 1..1008</a>

%e 89 is prime and appears in the sequence: 89 in binary = 1011001 and in octal = 131, which are also prime when read in decimal.

%p KD := proc() local a,b,d; a:=ithprime(n); b:=convert(a, binary); d:=convert(a,octal); if isprime(b) and isprime(d) then RETURN (a) ;fi; end: seq(KD(), n=1..50);

%t t = {}; n = 1; While[Length[t] < 50, n = NextPrime[n]; If[PrimeQ[FromDigits[IntegerDigits[n, 8]]] && PrimeQ[FromDigits[IntegerDigits[n, 2]]], AppendTo[t, n]]]; t (* _T. D. Noe_, Jan 26 2014 *)

%t Select[Prime[Range[1400]],AllTrue[FromDigits/@{IntegerDigits[ #,2],IntegerDigits[ #,8]},PrimeQ]&](* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, May 30 2018 *)

%Y Cf. A000040 (prime numbers), A065720 (primes: binary representation is also prime).

%K nonn,base

%O 1,1

%A _K. D. Bajpai_, Jan 23 2014

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 May 8 04:35 EDT 2024. Contains 372319 sequences. (Running on oeis4.)