Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A056563
Number of primes which are the difference between two triangular numbers, where the larger is the n-th triangular number.
2
0, 0, 1, 2, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 0, 1, 1, 1, 0, 1, 0
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