OFFSET
1,2
EXAMPLE
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.
MATHEMATICA
Select[Table[n (n + 1)/2, {n, 0, 200}], EvenQ[#] && ! PrimeQ[# + 1] &]
PROG
(Python)
from sympy import isprime
def A014494(n): return (2*n+1)*(2*n+1-(-1)**n)//2
def ok(et): return not isprime(et+1)
print(list(filter(ok, (A014494(n) for n in range(90))))) # Michael S. Branicky, Jun 15 2021
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Jun 15 2021
STATUS
approved