OFFSET
1,4
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
a(8)=3 because between T(8)=36 and T(9)=45 we have the prime numbers 37,41 and 43.
MAPLE
a:= proc(n) local ct, j: ct:=0: for j from n*(n+1)/2+1 to (n+1)*(n+2)/2-1 do if isprime(j)=true then ct:=ct+1 else ct:=ct fi: od: end: seq(a(n), n=1..103); # Emeric Deutsch, Feb 23 2005
MATHEMATICA
With[{trs=Partition[Accumulate[Range[100]], 2, 1]}, Join[{1}, Rest[ PrimePi[ #[[2]]]- PrimePi[#[[1]]]&/@trs]]] (* Harvey P. Dale, Aug 25 2015 *)
PROG
(Python)
from sympy import primerange
def A090970(n): return sum(1 for p in primerange((n*(n+1)>>1)+1, (n+2)*(n+1)>>1)) # Chai Wah Wu, May 22 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jan 03 2004
EXTENSIONS
More terms from Emeric Deutsch, Feb 23 2005
STATUS
approved
