A038474 Sums of two distinct powers of 5.
6, 26, 30, 126, 130, 150, 626, 630, 650, 750, 3126, 3130, 3150, 3250, 3750, 15626, 15630, 15650, 15750, 16250, 18750, 78126, 78130, 78150, 78250, 78750, 81250, 93750, 390626, 390630, 390650, 390750, 391250, 393750, 406250, 468750, 1953126, 1953130, 1953150
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Union[Total/@Subsets[5^Range[0, 15], {2}]] (* Harvey P. Dale, Jan 06 2011 *)
-
Python
from itertools import combinations, count, takewhile def aupto(lim): p = takewhile(lambda x: x<= lim, (5**i for i in count(0))) t = (sum(c) for c in combinations(p, 2)) return sorted(filter(lambda x: x <= lim, t)) print(aupto(10**6)) # Michael S. Branicky, Jun 26 2021
-
Python
from math import isqrt def A038474(n): return 5**(m:=isqrt(n<<3)+1>>1)+5**(n-1-(m*(m-1)>>1)) # Chai Wah Wu, Apr 04 2025
Extensions
Offset changed to 1 and a(37) and beyond from Michael S. Branicky, Jun 26 2021