login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345350 Even triangular numbers such that the next integer is nonprime. 1
0, 120, 300, 406, 496, 528, 666, 780, 1176, 1378, 1540, 1770, 2278, 2628, 3160, 3240, 3486, 3828, 4186, 4278, 5356, 5460, 5886, 6670, 6786, 7140, 7260, 7626, 7750, 8128, 8256, 9316, 9730, 10296, 10440, 10878, 11476, 11628, 12090, 12246, 12880, 13530, 14706, 15576 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Subsequence of A000217 (triangular numbers) and A014494 (even triangular numbers).
LINKS
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
Sequence in context: A257712 A250607 A076579 * A121898 A048190 A090391
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Jun 15 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)