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.

A352085 a(n) is the quotient wt(m^2) / wt(m), where wt = binary weight = A000120 and m = A352084(n).

This page as a plain text file.
%I A352085 #28 Mar 07 2022 07:55:01
%S A352085 1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,2,1,2,1,1,1,1,1,2,2,2,1,2,2,2,
%T A352085 2,1,1,2,1,1,1,1,1,1,2,2,2,2,2,2,2,1,1,1,2,2,2,2,2,2,2,1,1,1,1,2,2,1,
%U A352085 1,1,1,1,1,1,2,2,2,2,2,2,2,1,2,2,1,2,2,2,2,2,2
%N A352085 a(n) is the quotient wt(m^2) / wt(m), where wt = binary weight = A000120 and m = A352084(n).
%C A352085 All positive integers are terms of this sequence and the smallest integer k such that a(k) = n is A352086(n).
%C A352085 a(n) = 1 iff m = A352084(n) is a term of A077436, and a(n) = 2 iff m = A352084(n) is a term of A083567.
%H A352085 Martin Ehrenstein, <a href="/A352085/b352085.txt">Table of n, a(n) for n = 1..10000</a>
%H A352085 Diophante, <a href="http://www.diophante.fr/problemes-par-themes/arithmetique-et-algebre/a1-pot-pourri/4786-a1730-des-chiffres-a-sommer-pour-un-entier">A1730 - Des chiffres à sommer pour un entier</a> (in French).
%F A352085 a(n) = A159918(A352084(n))/A000120(A352084(n)).
%e A352085 For n=19, A352084(19) = 42_10 = 101010_2 => wt(42) = 3 ones; then 42^2 = 1764_10 = 11011100100_2 => wt(1764) = 6 ones, so that a(19) = wt(42^2) / wt(42) = 6/3 = 2.
%t A352085 Select[Total[IntegerDigits[#^2, 2]]/Total[IntegerDigits[#, 2]] & /@ Range[300], IntegerQ] (* _Amiram Eldar_, Mar 05 2022 *)
%o A352085 (PARI) lista(nn) = my(list = List(), q); for (n=1, nn, if (denominator(q=hammingweight(n^2)/hammingweight(n)) == 1, listput(list, q));); Vec(list); \\ _Michel Marcus_, Mar 05 2022
%o A352085 (Python)
%o A352085 from itertools import count, islice
%o A352085 def agen(): # generator of terms
%o A352085     for m in count(1):
%o A352085         q, r = divmod(bin(m**2).count('1'), bin(m).count('1'))
%o A352085         if r == 0:
%o A352085             yield q
%o A352085 print(list(islice(agen(), 100))) # _Michael S. Branicky_, Mar 05 2022
%Y A352085 Cf. A000120, A077436, A083567, A159918, A352084, A352086.
%K A352085 nonn,base
%O A352085 1,12
%A A352085 _Bernard Schott_, Mar 05 2022
%E A352085 More terms from _Michel Marcus_, Mar 05 2022