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 A322637 #14 May 22 2025 16:37:37 %S A322637 0,1,8,9,21,29,30,40,61,65,69,70,96,105,126,133,134,135,161,176,201, %T A322637 222,225,229,230,231,280,294,309,334,341,355,363,364,401,405,408,470, %U A322637 481,505,510,531,534,539,540,560,621,630,645,681,695,735,736,749,756,764,765,814,833,846 %N A322637 Numbers that are sums of consecutive octagonal numbers (A000567). %H A322637 Robert Israel, <a href="/A322637/b322637.txt">Table of n, a(n) for n = 1..10000</a> %H A322637 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OctagonalNumber.html">Octagonal Number</a> %p A322637 N:= 1000: # for terms up to N %p A322637 Octa:= [seq(n*(3*n-2),n=0..floor((1+sqrt(1+3*N))/3))]: %p A322637 PS:= ListTools:-PartialSums(Octa): %p A322637 S:= select(`<=`,{0,seq(seq(PS[i]-PS[j],j=1..i-1),i=1..nops(PS))},N): %p A322637 sort(convert(S,list)); # _Robert Israel_, May 22 2025 %t A322637 terms = 60; %t A322637 nmax = 17; kmax = 9; (* empirical *) %t A322637 T = Table[n(3n-2), {n, 0, nmax}]; %t A322637 Union[T, Table[k MovingAverage[T, k], {k, 2, kmax}]//Flatten][[1 ;; terms]] (* _Jean-François Alcover_, Dec 26 2018 *) %Y A322637 Cf. A000567, A002414, A034705, A034706, A319184, A319185, A322636. %K A322637 nonn %O A322637 1,3 %A A322637 _Ilya Gutkovskiy_, Dec 21 2018