cp's OEIS Frontend

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.

A038474 Sums of two distinct powers of 5.

This page as a plain text file.
%I A038474 #21 Apr 04 2025 11:27:27
%S A038474 6,26,30,126,130,150,626,630,650,750,3126,3130,3150,3250,3750,15626,
%T A038474 15630,15650,15750,16250,18750,78126,78130,78150,78250,78750,81250,
%U A038474 93750,390626,390630,390650,390750,391250,393750,406250,468750,1953126,1953130,1953150
%N A038474 Sums of two distinct powers of 5.
%H A038474 Amiram Eldar, <a href="/A038474/b038474.txt">Table of n, a(n) for n = 1..10000</a>
%t A038474 Union[Total/@Subsets[5^Range[0, 15], {2}]] (* _Harvey P. Dale_, Jan 06 2011 *)
%o A038474 (Python)
%o A038474 from itertools import combinations, count, takewhile
%o A038474 def aupto(lim):
%o A038474   p = takewhile(lambda x: x<= lim, (5**i for i in count(0)))
%o A038474   t = (sum(c) for c in combinations(p, 2))
%o A038474   return sorted(filter(lambda x: x <= lim, t))
%o A038474 print(aupto(10**6)) # _Michael S. Branicky_, Jun 26 2021
%o A038474 (Python)
%o A038474 from math import isqrt
%o A038474 def A038474(n): return 5**(m:=isqrt(n<<3)+1>>1)+5**(n-1-(m*(m-1)>>1)) # _Chai Wah Wu_, Apr 04 2025
%Y A038474 Base 5 interpretation of A038444.
%Y A038474 Cf. A000351, A038475, A038476, A038477.
%K A038474 nonn,easy
%O A038474 1,1
%A A038474 _Olivier Gérard_
%E A038474 Offset changed to 1 and a(37) and beyond from _Michael S. Branicky_, Jun 26 2021