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.

A359315 a(n) is the smallest centered triangular number with binary weight n.

This page as a plain text file.
%I A359315 #9 Feb 16 2025 08:34:04
%S A359315 1,10,19,46,31,235,631,1786,1999,7669,7039,12286,16381,180094,114679,
%T A359315 949231,2086831,2883574,4175839,12480511,50329585,62898151,132638719,
%U A359315 234618814,771743710,2883510271,4269733885,8254119871,17045499901,33214168831
%N A359315 a(n) is the smallest centered triangular number with binary weight n.
%H A359315 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CenteredTriangularNumber.html">Centered Triangular Number</a>
%H A359315 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e A359315 235 is the smallest centered triangular number with binary weight 6 (235_10 = 11101011_2), so a(6) = 235.
%t A359315 seq[len_,nmax_] := Module[{s = Table[0,{len}], n = 1, c = 0, bw, ct}, While[c < len && n < nmax, bw = DigitCount[ct = 3*n*(n-1)/2 + 1, 2, 1]; If[bw <= len && s[[bw]] == 0, c++; s[[bw]] = ct]; n++]; s]; seq[30, 10^6] (* _Amiram Eldar_, Dec 26 2022 *)
%Y A359315 Cf. A000120, A005448, A089999, A358932, A359316.
%K A359315 nonn,base
%O A359315 1,2
%A A359315 _Ilya Gutkovskiy_, Dec 25 2022