OFFSET
0,4
EXAMPLE
a(7)=2 because 7th triangular number is 28 and both 28-21=7 and 28-15=13 are primes.
MATHEMATICA
Join[{0}, Table[With[{tr=Accumulate[Range[n]]}, Count[tr[[-1]]-Most[tr], _?PrimeQ]], {n, 120}]] (* Harvey P. Dale, Mar 31 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jun 27 2000
EXTENSIONS
Formula deleted by Harvey P. Dale, Mar 31 2023
STATUS
approved