cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A090970 Number of primes strictly between T(n) and T(n+1), where T(n) = n-th triangular number.

This page as a plain text file.
%I A090970 #18 May 22 2025 09:22:09
%S A090970 1,1,1,2,2,1,2,3,2,2,3,3,3,3,2,4,3,3,4,4,4,4,4,4,4,4,5,5,6,4,5,3,6,6,
%T A090970 7,5,5,6,4,8,5,6,6,8,6,8,5,7,5,11,4,6,9,7,8,9,8,7,7,9,7,8,7,12,5,9,9,
%U A090970 11,9,7,7,12,10,10,9,9,9,6,11,10,11,9,12,11,12,9,10,11,12,10,13,9,11,10,12
%N A090970 Number of primes strictly between T(n) and T(n+1), where T(n) = n-th triangular number.
%H A090970 T. D. Noe, <a href="/A090970/b090970.txt">Table of n, a(n) for n = 1..10000</a>
%e A090970 a(8)=3 because between T(8)=36 and T(9)=45 we have the prime numbers 37,41 and 43.
%p A090970 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
%t A090970 With[{trs=Partition[Accumulate[Range[100]],2,1]},Join[{1},Rest[ PrimePi[ #[[2]]]- PrimePi[#[[1]]]&/@trs]]] (* _Harvey P. Dale_, Aug 25 2015 *)
%o A090970 (Python)
%o A090970 from sympy import primerange
%o A090970 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
%Y A090970 Essentially the same as A065382 and A066888.
%K A090970 nonn
%O A090970 1,4
%A A090970 _Amarnath Murthy_, Jan 03 2004
%E A090970 More terms from _Emeric Deutsch_, Feb 23 2005