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 A338482 #18 Feb 16 2025 08:34:00 %S A338482 1,2,3,1,2,3,4,2,3,1,2,3,4,2,3,4,5,3,1,2,3,4,2,3,4,5,3,4,2,3,1,2,3,4, %T A338482 2,3,4,2,3,4,2,3,4,5,3,1,2,3,4,2,3,4,5,3,4,2,3,4,5,3,4,2,3,1,2,3,4,2, %U A338482 3,4,5,3,4,2,3,4,2,3,4,5,3,4,2,3,1,2,3,4,2,3,4,2,3,4,2,3,4,5,3,4,5 %N A338482 Least number of centered triangular numbers that sum to n. %C A338482 It appears that a(n) = 3 for n == 0 (mod 3), 1 <= a(n) <= 4 for n == 1 (mod 3), and 2 <= a(n) <= 5 for n == 2 (mod 3). - _Robert Israel_, Nov 13 2020 %H A338482 Robert Israel, <a href="/A338482/b338482.txt">Table of n, a(n) for n = 1..10000</a> %H A338482 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CenteredTriangularNumber.html">Centered Triangular Number</a> %H A338482 <a href="/index/Ce#CENTRALCUBE">Index entries for sequences related to centered polygonal numbers</a> %p A338482 f:= proc(n) option remember; local r,i; %p A338482 r:= sqrt(24*n-15)/6+1/2; %p A338482 if r::integer then return 1 fi; %p A338482 1+min(seq(procname(n-(3*i*(i-1)/2+1)),i=1..floor(r))) %p A338482 end proc: %p A338482 map(f, [$1..200]); # _Robert Israel_, Nov 13 2020 %t A338482 f[n_] := f[n] = Module[{r}, r = Sqrt[24n-15]/6+1/2; If[IntegerQ[r], Return[1]]; 1+Min[Table[f[n-(3i*(i-1)/2+1)], {i, 1, Floor[r]}]]]; %t A338482 Map[f, Range[200]] (* _Jean-François Alcover_, Sep 16 2022, after _Robert Israel_ *) %Y A338482 Cf. A005448, A061336, A101412, A104246, A234533, A338484. %K A338482 nonn %O A338482 1,2 %A A338482 _Ilya Gutkovskiy_, Oct 29 2020