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 A214856 #24 Dec 09 2024 15:55:13 %S A214856 1,1,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2, %T A214856 1,2,1,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2, %U A214856 1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,1 %N A214856 Number of triangular numbers in interval ](n-1)^2, n^2] for n>0, a(0)=1. %H A214856 Alois P. Heinz, <a href="/A214856/b214856.txt">Table of n, a(n) for n = 0..10000</a> %e A214856 10, 15 are in interval ]9, 16] , a(4) = 2. %o A214856 (PARI) a(n) = if (n, sum(i=(n-1)^2+1, n^2, ispolygonal(i, 3)), 1); \\ _Michel Marcus_, Nov 12 2022 %o A214856 (Python) %o A214856 from math import isqrt %o A214856 def A214856(n): return (isqrt((m:=n**2<<3)+8)+1>>1)-(isqrt(m-(n-1<<4))+1>>1) if n else 1 # _Chai Wah Wu_, Dec 09 2024 %Y A214856 Cf. A000217, A000290, A214848, A214857. %K A214856 nonn,easy %O A214856 0,5 %A A214856 _Philippe Deléham_, Mar 08 2013