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.
%I A323275 #47 Jul 29 2025 11:10:13 %S A323275 1,2,2,2,2,2,2,10,7,10,3,7,5,10,7,22,6,22,5,7,8,22,10,10,8,8,10,10,6, %T A323275 8,22,8,22,8,9,8,10,8,8,22,10,22,22,22,22,22,8,15,22,11,15,15,22,11, %U A323275 16,16,22,15,10,16,15,22,15,14,22,14,17,23,40,15,22,22,40,12,22,22,16,12,18,27,18,40,40,40,22,40,40,14,18,34 %N A323275 Let f(p, q) denote the pair (p + q, wt(p) + wt(q)); a(n) is obtained by iterating f starting at (n, 1) until p/q is an integer (and then a(n) is that integer), or if no integer is ever reached then a(n) = -1. (Here wt is binary weight, A000120.) %H A323275 Amiram Eldar, <a href="/A323275/b323275.txt">Table of n, a(n) for n = 1..10000</a> %H A323275 Jeffrey C. Lagarias, <a href="https://www.jstor.org/stable/27641862">Wild and Wooley numbers</a>, The American Mathematical Monthly, Vol. 113, No. 2 (2006), pp. 97-108; <a href="https://arxiv.org/abs/math/0411141">arXiv preprint</a>, arXiv:math/0411141 [math.NT], 2004-2005. %e A323275 (8, 1) -> (9, 2) -> (11, 3) -> (14, 5) -> (19, 5) -> (24, 5) -> (29, 4) -> (33, 5) -> (38, 4) -> (42, 4) -> (46, 4) -> (50, 5). 50/5 is an integer, so a(8) = 50/5 = 10. %t A323275 a[n_] := Divide@@ NestWhile[{Total[#], Total[DigitCount[#,2,1]]}&, {n, 1}, Last[#] == 1 || !Divisible@@# &];Array[a, 100] (* _Amiram Eldar_, Jul 29 2025 *) %o A323275 (PARI) f(v) = return([v[1]+v[2], hammingweight(v[1])+hammingweight(v[2])]); %o A323275 a(n) = {my(nb = 0, v = [n, 1]); while (1, v = f(v); nb++; if (frac(q=v[1]/v[2]) == 0, return (q)));} \\ _Michel Marcus_, Jan 13 2019 %Y A323275 Cf. A000120, A059175, A323375. %K A323275 nonn,base %O A323275 1,2 %A A323275 _Ctibor O. Zizka_, Jan 12 2019 %E A323275 Missing term a(87) inserted by _Amiram Eldar_, Jul 29 2025