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 A379676 #9 Dec 30 2024 02:13:11 %S A379676 3,7,4,15,7,5,10,31,13,6,16,12,19,10,7,63,25,11,28,22,8,15,34,21,37, %T A379676 16,40,9,43,20,46,127,14,21,18,10,55,25,15,19,61,26,64,45,11,30,70,44, %U A379676 73,31,21,55,79,35,12,70,22,36,88,18,91,40,34,255,31,13,100,19,28,24,106,92,109,46,29,78,25,14,118,91,121,51,124,63,42,55,35,39,133,43,15 %N A379676 For n >= 0, a(n) is the least k >= 2 such that (n + 1)*(2*k + n) / 2 is a triangular number (A000217). %C A379676 Also for n >= 0, a(n) is the least k >= 2 such that the Sum_{i = 0..n} (k + i) is a triangular number (A000217). For k = 0, 1 the Sum is a triangular number for all n. The sequences A076114 and A076116 are for square sum and cube sum. %F A379676 For i >= 0, a(2^i - 1) = 2^(i + 2) - 1, max. values of a(n). %F A379676 For i >= 0, a(i*(i + 3)/2) = i + 3, min. values of a(n). %F A379676 For i >= 1, i is not from A083390, a(2*i) = (3*i + 1). %e A379676 n = 4: the least k >= 2 such that (4 + 1)*(2*k + 4)/2 = 5*k + 10 is a triangular number is k = 7, thus a(4) = 7. %e A379676 n = 5: the least k >= 2 such that (5 + 1)*(2*k + 5)/2 = 6*k + 15 is a triangular number is k = 5, thus a(5) = 5. %t A379676 a[n_] := Module[{k = 2}, While[! IntegerQ[Sqrt[4*(n + 1)*(2*k + n) + 1]], k++]; k]; Array[a, 100, 0] (* _Amiram Eldar_, Dec 30 2024 *) %o A379676 (PARI) a(n) = my(k=2); while (!ispolygonal((n + 1)*(2*k + n)/2, 3), k++); k; \\ _Michel Marcus_, Dec 30 2024 %Y A379676 Cf. A000217, A076114, A076116, A083390. %K A379676 nonn %O A379676 0,1 %A A379676 _Ctibor O. Zizka_, Dec 29 2024