A227092 Numbers whose base-7 sum of digits is 7.
13, 19, 25, 31, 37, 43, 55, 61, 67, 73, 79, 85, 91, 103, 109, 115, 121, 127, 133, 151, 157, 163, 169, 175, 199, 205, 211, 217, 247, 253, 259, 295, 301, 349, 355, 361, 367, 373, 379, 385, 397, 403, 409, 415, 421, 427, 445, 451, 457, 463, 469, 493, 499, 505
Offset: 1
Examples
The 7-ary expansion of 13 is (1,6), which has sum of digits 7. The 7-ary expansion of 103 is (2,0,5), which has sum of digits 7. 10 is not on the list since the 7-ary expansion of 10 is (1,3), which has sum of digits 4 not 7.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[Range[600],Total[IntegerDigits[#,7]]==7&] (* Harvey P. Dale, Aug 18 2014 *)
-
PARI
select( is(n)=sumdigits(n,7)==7, [1..999]) \\ M. F. Hasler, Dec 23 2016
-
Python
agen = A226636gen(sod=7, base=7) # generator of terms using code in A226636 print([next(agen) for n in range(1, 55)]) # Michael S. Branicky, Jul 10 2022
-
Sage
[i for i in [0..1000] if sum(Integer(i).digits(base=7))==7]
Comments