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.

A177869 Integers divisible by their number of digits in binary.

This page as a plain text file.
%I A177869 #26 May 19 2021 16:04:38
%S A177869 1,2,6,8,12,20,25,30,36,42,48,54,60,70,77,84,91,98,105,112,119,126,
%T A177869 128,136,144,152,160,168,176,184,192,200,208,216,224,232,240,248,261,
%U A177869 270,279,288,297,306,315,324,333,342,351,360,369,378,387,396,405
%N A177869 Integers divisible by their number of digits in binary.
%H A177869 Daniel Arribas, <a href="/A177869/b177869.txt">Table of n, a(n) for n = 1..1000</a>
%e A177869 105 is 1101001 in base 2 (length of 7); 105 / 7 is 15.
%t A177869 Select[Range[410], IntegerQ[#/Length[IntegerDigits[#, 2]]] &] (* _Alonso del Arte_, Dec 13 2010 *)
%o A177869 (Python)
%o A177869 import math
%o A177869 for n in range(1, 1000):
%o A177869     if not n % int(math.log(n, 2) + 1): print(n) # Garcia
%o A177869 (Haskell)
%o A177869 base_weight b g n | n == 0 = 0 | otherwise = (base_weight b g (n `div` b)) + (g $ n `mod` b)
%o A177869 interesting b g = filter f [1..] where f n = n `mod` (base_weight b g n) == 0
%o A177869 bin_interesting g = interesting 2 g
%o A177869 weights l n | (n >=0) && ((length l) > fromInteger n) = l !! fromInteger n | otherwise = 0
%o A177869 cnst = weights [1, 1]
%o A177869 let sequence = bin_interesting cnst -- Victor S. Miller, Oct 17 2011
%o A177869 (PARI) for(d=1, 9, forstep(n=(2^(d-1)+d-1)\d*d, 2^d-1, d, print1(n", "))) \\ _Charles R Greathouse IV_, Oct 17 2011
%Y A177869 Base 10 equivalent is A098952.
%K A177869 nonn,base
%O A177869 1,2
%A A177869 _Grant Garcia_, Dec 13 2010