OFFSET
1,1
COMMENTS
Primes whose base 3 representation contains only 0's and 1's.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..10000
EXAMPLE
31 = 3^3 + 3 + 1 belongs to this sequence.
MATHEMATICA
Select[FromDigits[#, 3]&/@Tuples[{0, 1}, 10], PrimeQ] (* Harvey P. Dale, Mar 30 2015 *)
PROG
(PARI) print1(3); forstep(n=3, 1e3, 2, if(isprime(t=fromdigits(binary(n), 3)), print1(", "t))) \\ Charles R Greathouse IV, Mar 28 2022
(PARI) is_A077717(n)=vecmax(digits(n, 3))<2 && isprime(n)
select(is_A077717, [1..9111]) \\ M. F. Hasler, Feb 15 2023
(Python)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Nov 19 2002
EXTENSIONS
More terms from John W. Layman, Nov 22 2002
STATUS
approved