A227095 Numbers whose base-8 sum of digits is 8.
15, 22, 29, 36, 43, 50, 57, 71, 78, 85, 92, 99, 106, 113, 120, 134, 141, 148, 155, 162, 169, 176, 197, 204, 211, 218, 225, 232, 260, 267, 274, 281, 288, 323, 330, 337, 344, 386, 393, 400, 449, 456, 519, 526, 533, 540, 547, 554, 561, 568, 582, 589, 596, 603
Offset: 1
Examples
The 8-ary expansion of 15 is (1,7), which has sum of digits 8. The 8-ary expansion of 78 is (1,1,6), which has sum of digits 8. 10 is not on the list since the 8-ary expansion of 10 is (1,2), which has sum of digits 3 not 8.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[Range@ 603, Total@ IntegerDigits[#, 8] == 8 &] (* Michael De Vlieger, Dec 23 2016 *)
-
PARI
select( is(n)=sumdigits(n,8)==8, [1..999]) \\ M. F. Hasler, Dec 23 2016
-
Python
agen = A226636gen(sod=8, base=8) # 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=8))==8]
Comments