login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

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
3, 5, 89, 179, 199, 367, 383, 443, 523, 659, 947, 1097, 1163, 1289, 1483, 1753, 2351, 2423, 2903, 3041, 3217, 3299, 3631, 4729, 4951, 5119, 5347, 5879, 6007, 6131, 6491, 6911, 7547, 7577, 7649, 8167, 8849, 9241, 9511, 9817, 9929, 10303, 10831, 11251, 11527 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

K. D. Bajpai, Table of n, a(n) for n = 1..1008

EXAMPLE

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

MAPLE

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);

MATHEMATICA

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 *)

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 *)

CROSSREFS

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

Sequence in context: A082715 A133660 A271925 * A057663 A056244 A173487

Adjacent sequences:  A236362 A236363 A236364 * A236366 A236367 A236368

KEYWORD

nonn,base

AUTHOR

K. D. Bajpai, Jan 23 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 08:49 EST 2019. Contains 329862 sequences. (Running on oeis4.)