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 A227062 #27 Jul 10 2022 13:23:58 %S A227062 9,13,17,21,29,33,37,41,45,53,57,61,65,77,81,85,101,105,129,133,137, %T A227062 141,145,153,157,161,165,177,181,185,201,205,225,253,257,261,265,277, %U A227062 281,285,301,305,325,377,381,385,401,405,425,501,505,525,629,633,637 %N A227062 Numbers whose base-5 sum of digits is 5. %C A227062 All of the entries are odd. %C A227062 Subsequence of A016813. - _Michel Marcus_, Sep 03 2013 %C A227062 In general, the set of numbers with sum of base-b digits equal to b is a subset of { (b-1)*k + 1; k = 2, 3, 4, ... }. - _M. F. Hasler_, Dec 23 2016 %H A227062 Michael S. Branicky, <a href="/A227062/b227062.txt">Table of n, a(n) for n = 1..11613</a> (all terms with <= 15 base-5 digits) %e A227062 The 5-ary expansion of 9 is (1,4), which has sum of digits 5. %e A227062 The 5-ary expansion of 53 is (2,0,3), which has sum of digits 5. %e A227062 10 is not on the list since the 5-ary expansion of 10 is (2,0), which has sum of digits 2 not 5. %t A227062 Select[Range@ 640, Total@ IntegerDigits[#, 5] == 5 &] (* _Michael De Vlieger_, Dec 23 2016 *) %o A227062 (Sage) [i for i in [0..1000] if sum(Integer(i).digits(base=5))==5] %o A227062 (PARI) select( is(n)=sumdigits(n,5)==5, [1..999]) \\ _M. F. Hasler_, Dec 23 2016 %o A227062 (Python) %o A227062 from sympy.utilities.iterables import multiset_permutations %o A227062 def auptodigs(maxdigits_base5): %o A227062 alst = [] %o A227062 for d in range(2, maxdigits_base5 + 1): %o A227062 fulldigset = list("0"*(d-2) + "111112234") %o A227062 for firstdig in "1234": %o A227062 target_sum, restdigset = 5 - int(firstdig), fulldigset[:] %o A227062 restdigset.remove(firstdig) %o A227062 for p in multiset_permutations(restdigset, d-1): %o A227062 if sum(map(int, p)) == target_sum: %o A227062 alst.append(int(firstdig+"".join(p), 5)) %o A227062 if int(p[0]) == target_sum: %o A227062 break %o A227062 return alst %o A227062 print(auptodigs(5)) # _Michael S. Branicky_, Sep 13 2021 %o A227062 (Python) %o A227062 agen = A226636gen(sod=5, base=5) # generator of terms using code in A226636 %o A227062 print([next(agen) for n in range(1, 56)]) # _Michael S. Branicky_, Jul 10 2022 %Y A227062 Cf. A018900, A187813. %Y A227062 Cf. A226636 (b = 3), A226969 (b = 4), A227080 (b = 6), A227092 (b = 7), A227095 (b = 8), A227238 (b = 9), A052224 (b = 10). %K A227062 nonn,base,easy %O A227062 1,1 %A A227062 _Tom Edgar_, Sep 01 2013