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.
%I A077717 #24 Mar 04 2023 02:03:11 %S A077717 3,13,31,37,109,271,283,337,733,739,757,769,811,823,1009,1063,1093, %T A077717 2269,2281,2467,2521,2539,2551,2917,2953,3001,3037,3163,3169,3187, %U A077717 3253,3271,6571,6673,6679,6841,7321,7411,7537,7561,7573,8761,8779,8839,9001 %N A077717 Primes which can be expressed as a sum of distinct powers of 3. %C A077717 Primes whose base 3 representation contains only 0's and 1's. %H A077717 Harvey P. Dale, <a href="/A077717/b077717.txt">Table of n, a(n) for n = 1..10000</a> %e A077717 31 = 3^3 + 3 + 1 belongs to this sequence. %t A077717 Select[FromDigits[#,3]&/@Tuples[{0,1},10],PrimeQ] (* _Harvey P. Dale_, Mar 30 2015 *) %o A077717 (PARI) print1(3); forstep(n=3,1e3,2, if(isprime(t=fromdigits(binary(n),3)), print1(", "t))) \\ _Charles R Greathouse IV_, Mar 28 2022 %o A077717 (PARI) is_A077717(n)=vecmax(digits(n,3))<2 && isprime(n) %o A077717 select(is_A077717, [1..9111]) \\ _M. F. Hasler_, Feb 15 2023 %o A077717 (Python) %o A077717 def is_A077717(n): return A039966(n) and A010051(n) # _M. F. Hasler_, Feb 15 2023 %Y A077717 Cf. A020449, A077718, A077719, A077720, A077721, A077722, A077724. %K A077717 nonn,easy %O A077717 1,1 %A A077717 _Amarnath Murthy_, Nov 19 2002 %E A077717 More terms from _John W. Layman_, Nov 22 2002