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 A345350 #22 Mar 23 2025 14:58:56 %S A345350 0,120,300,406,496,528,666,780,1176,1378,1540,1770,2278,2628,3160, %T A345350 3240,3486,3828,4186,4278,5356,5460,5886,6670,6786,7140,7260,7626, %U A345350 7750,8128,8256,9316,9730,10296,10440,10878,11476,11628,12090,12246,12880,13530,14706,15576 %N A345350 Even triangular numbers such that the next integer is nonprime. %C A345350 Subsequence of A000217 (triangular numbers) and A014494 (even triangular numbers). %e A345350 Even triangular numbers 6, 10, 28, 36, 66, and 78 are all followed by a prime number. Even triangular number 120 is followed by a composite number 121. Thus, a(1) = 120. %t A345350 Select[Table[n (n + 1)/2, {n, 0, 200}], EvenQ[#] && ! PrimeQ[# + 1] &] %t A345350 Select[Accumulate[Range[0,300]],EvenQ[#]&&!PrimeQ[#+1]&] (* _Harvey P. Dale_, Mar 23 2025 *) %o A345350 (Python) %o A345350 from sympy import isprime %o A345350 def A014494(n): return (2*n+1)*(2*n+1-(-1)**n)//2 %o A345350 def ok(et): return not isprime(et+1) %o A345350 print(list(filter(ok, (A014494(n) for n in range(90))))) # _Michael S. Branicky_, Jun 15 2021 %o A345350 (PARI) lista(nn) = for (n=1, nn, my(t=n*(n+1)/2); if (!(t%2) && !isprime(t+1), print1(t, ", "))) \\ _Michel Marcus_, Jun 16 2021 %Y A345350 Cf. A000217, A014494, A129545. %K A345350 nonn %O A345350 1,2 %A A345350 _Tanya Khovanova_, Jun 15 2021