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 A077724 #14 Apr 04 2025 14:37:17 %S A077724 2,3,5,5,7,7,73,739,11,11,13,13,197,241,17,17,19,19,401,463,23,23,577, %T A077724 10171901,677,757,29,29,31,31,32801,1123,1336337,44101,37,37,1483, %U A077724 59359,41,41,43,43,85229,93151,47,47,110641,13847169701,2551,345157903,53,53 %N A077724 a(n) = smallest prime which can be expressed as a sum of distinct powers of n. %C A077724 a(n) = smallest prime whose base n representation contains only zeros and 1's. %C A077724 Values of n at which a(n) reach record values are: 2, 3, 4, 6, 8, 9, 25, 49, 91, 121, 187, 201, 301, 721, 799, 841... Notably, many of them are squares of primes. - _Ivan Neretin_, Sep 20 2017 %H A077724 Ivan Neretin, <a href="/A077724/b077724.txt">Table of n, a(n) for n = 2..10000</a> %t A077724 Table[i = p = 1; While[! PrimeQ[p], p = FromDigits[IntegerDigits[i++, 2], n]]; p, {n, 2, 53}] (* _Ivan Neretin_, Sep 20 2017 *) %o A077724 (Python) %o A077724 from itertools import count %o A077724 from sympy import isprime %o A077724 def A077724(n): return next(filter(isprime,(sum(n**i for i, j in enumerate(bin(m)[-1:1:-1]) if j=='1') for m in count(1)))) # _Chai Wah Wu_, Apr 04 2025 %Y A077724 Cf. A020449, A000695, A033046, A077717, A077718, A077719, A077720, A077721, A077722, A077723. %K A077724 nonn %O A077724 2,1 %A A077724 _Amarnath Murthy_, Nov 19 2002 %E A077724 More terms from _Sascha Kurz_, Jan 03 2003