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.

A064150 Numbers divisible by the sum of their ternary digits.

This page as a plain text file.
%I A064150 #38 Jan 05 2025 19:51:36
%S A064150 1,2,3,4,6,8,9,10,12,15,16,18,20,21,24,25,27,28,30,32,33,35,36,39,40,
%T A064150 45,48,54,56,57,60,63,64,65,72,75,77,78,80,81,82,84,87,88,90,92,93,95,
%U A064150 96,99,100,105,108,111,112,115,117,120,132,133,135,136,144,145,150,152
%N A064150 Numbers divisible by the sum of their ternary digits.
%C A064150 a(n) mod A053735(a(n)) = 0. - _Reinhard Zumkeller_, Nov 25 2009
%H A064150 Reinhard Zumkeller, <a href="/A064150/b064150.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harry J. Smith).
%H A064150 Paul Dahlenberg and Tom Edgar, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Abstracts/56-2/dalenberg.pdf">Consecutive factorial base Niven numbers</a>, Fibonacci Quarterly, Vol. 56, No. 2 (2018), pp. 163-166.
%t A064150 Select[Range[200], IntegerQ[#/(Plus@@IntegerDigits[#, 3])] &] (* _Alonso del Arte_, May 27 2011 *)
%o A064150 (PARI) isok(m)={m % sumdigits(m, 3) == 0} \\ _Harry J. Smith_, Sep 09 2009
%o A064150 (Haskell)
%o A064150 a064150 n = a064150_list !! (n-1)
%o A064150 a064150_list = filter (\x -> x `mod` a053735 x == 0) [1..]
%o A064150 -- _Reinhard Zumkeller_, Oct 28 2012
%o A064150 (Python)
%o A064150 import numpy as np
%o A064150 def gen():
%o A064150     for dec_num in range(1,153):
%o A064150         tern_num = np.base_repr(dec_num, 3)
%o A064150         sum_tern_digits = 0
%o A064150         for i in tern_num:
%o A064150             sum_tern_digits += int(i)
%o A064150         if dec_num % sum_tern_digits == 0:
%o A064150             yield dec_num
%o A064150 print(list((gen()))) # _Adrienne Leonardo_, Dec 28 2024
%Y A064150 Cf. A005349 (Decimal), A049445 (Binary).
%K A064150 base,easy,nonn,nice
%O A064150 1,2
%A A064150 _Len Smiley_, Sep 11 2001
%E A064150 Corrected and extended by _Vladeta Jovovic_, Sep 22 2001
%E A064150 Offset corrected by _Reinhard Zumkeller_, Oct 28 2012