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.

A245802 Numbers that are divisible by the sum of their base 8 digits.

This page as a plain text file.
%I A245802 #33 Sep 01 2014 01:31:53
%S A245802 1,2,3,4,5,6,7,8,14,16,21,24,28,32,35,40,42,48,49,56,64,66,70,72,75,
%T A245802 77,84,88,90,91,98,105,112,120,126,128,129,132,133,135,140,144,145,
%U A245802 147,150,154,161,165,168,176,180,182,192,196,198,200,203,210,216,217
%N A245802 Numbers that are divisible by the sum of their base 8 digits.
%C A245802 A base 8 version of Harshad (or Niven) numbers (A005349).
%C A245802 Numbers n such that n = 0 modulo A053829(n), where the latter sequence gives the sum of digits when n is represented in the octal number system. - _Antti Karttunen_, Aug 22 2014
%H A245802 Chai Wah Wu, <a href="/A245802/b245802.txt">Table of n, a(n) for n = 1..10000</a>
%H A245802 <a href="/index/O#octal">Index entries for sequences related to octal numbers</a>
%e A245802 36971 is in the sequence as it is 110153 in octal and 1 + 1 + 0 + 1 + 5 + 3 = 11 which divides 36971.
%t A245802 Select[Range[256], IntegerQ[#/(Plus@@IntegerDigits[#, 8])] &] (* _Alonso del Arte_, Aug 26 2014 *)
%o A245802 (Python)
%o A245802 from gmpy2 import digits
%o A245802 A245802 = [n for n in range(1,10**3) if not n % sum([int(d) for d in digits(n,8)])]
%o A245802 (MIT/GNU Scheme, with _Antti Karttunen_'s IntSeq-library)
%o A245802 (define A245802 (MATCHING-POS 1 1 (lambda (n) (zero? (modulo n (A053829 n))))))
%o A245802 (define (A053829 n) (let loop ((n n) (i 0)) (if (zero? n) i (loop (floor->exact (/ n 8)) (+ i (modulo n 8))))))
%Y A245802 Cf. A005349, A053829, A241989.
%K A245802 nonn,base
%O A245802 1,2
%A A245802 _Chai Wah Wu_, Aug 22 2014