cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236537 Primes whose binary and ternary representations are also prime when read in decimal.

This page as a plain text file.
%I A236537 #23 Jul 19 2016 11:39:41
%S A236537 157,199,229,313,367,523,883,1483,2683,2971,3109,3253,3637,4093,4357,
%T A236537 4363,4729,4951,5119,5827,6529,9241,10909,11527,13477,15271,15919,
%U A236537 18439,19273,19483,22921,24019,29833,31237,31573,32803,35863,35899,36109,36973,39799
%N A236537 Primes whose binary and ternary representations are also prime when read in decimal.
%H A236537 K. D. Bajpai, <a href="/A236537/b236537.txt">Table of n, a(n) for n = 1..2115</a>
%e A236537 157 is prime and appears in the sequence. Its representation in binary = 10011101 and in ternary = 12211 are also prime when read in decimal.
%e A236537 313 is prime and appears in the sequence. Its representation in binary = 100111001 and in ternary = 102121 are also prime when read in decimal.
%t A236537 t={}; n=1; While[Length[t] < 50, n=NextPrime[n]; If[PrimeQ[FromDigits[IntegerDigits[n,2]]] && PrimeQ[FromDigits[IntegerDigits[n,3]]], AppendTo[t,n]]]; t
%o A236537 (PARI) base_b(n, b) = my(s=[], r, x=10); while(n>0, r = n%b; n = n\b; s = concat(r, s)); eval(Pol(s))
%o A236537 s=[]; forprime(p=2, 40000, if(isprime(base_b(p, 2)) && isprime(base_b(p, 3)), s=concat(s, p))); s \\ _Colin Barker_, Jan 28 2014
%Y A236537 Cf. A000040 (prime numbers), A065720 (primes: binary representation is also prime), A236365 (primes: binary and octal representation is also prime), A236512 (primes: base 2, 3, 4 and 5 representation are also prime).
%K A236537 nonn,base
%O A236537 1,1
%A A236537 _K. D. Bajpai_, Jan 28 2014