A036955 Numbers whose base-4 representation is the decimal representation of a prime.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 47, 53, 55, 61, 71, 73, 77, 79, 83, 91, 97, 103, 107, 109, 113, 115, 121, 131, 133, 149, 151, 157, 163, 167, 169, 181, 191, 193, 197, 203, 217, 227, 233, 241, 247, 251, 253, 275, 277, 287, 293, 299, 305, 307, 311, 313
Offset: 1
Examples
55 is in the sequence because 55_10 = 313_4 and 313_10 is prime. 313 is in the sequence because 313_10 = 10321_4 and 10321_10 is prime. 31 is not in the sequence because 31_10 = 133_4 and 133_10 = 7*19 is not prime.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
FromDigits[IntegerDigits[#],4]&/@Select[Prime[Range[2000]],Max[ IntegerDigits[ #]]<4&] (* Harvey P. Dale, May 02 2015 *)
-
PARI
is(n)=isprime(sum(i=1,#n=digits(n,4),n[i]*10^(#n-i))) \\ M. F. Hasler, Jul 25 2015
Extensions
Offset corrected to 1 and minor edits by M. F. Hasler, Jul 25 2015
Comments