A131354 Number of primes in the open interval between successive tribonacci numbers.
0, 0, 0, 0, 1, 1, 1, 3, 5, 8, 12, 23, 38, 61, 109, 179, 312, 537, 920, 1598, 2779, 4835, 8461, 14784, 25984, 45696, 80505, 142165, 251300, 444930, 788828, 1400756, 2489594, 4430712, 7892037, 14073786, 25118167, 44869652, 80223172, 143535369, 257014148, 460524864, 825732764
Offset: 0
Keywords
Examples
Between Trib(8)=24 and Trib(9)=44 we find the following primes: 29, 31, 37, 41, 43, hence a(8)=5.
Programs
-
Maple
A131354 := proc(n) a := 0 ; for k from 1+A000073(n) to A000073(n+1)-1 do if isprime(k) then a := a+1 ; end if; end do; a ; end proc: # R. J. Mathar, Dec 14 2011
-
Mathematica
trib[n_] := SeriesCoefficient[x^2/(1 - x - x^2 - x^3), {x, 0, n}]; a[n_] := PrimePi[trib[n + 1] - 1] - PrimePi[trib[n]]; a /@ Range[0, 42] (* Jean-François Alcover, Apr 10 2020 *)
-
PARI
\\ here b(n) is A000073(n). b(n)={polcoef(x^2/(1-x-x^2-x^3) + O(x*x^n), n)} a(n)={primepi(b(n+1)-1) - primepi(b(n))} \\ Andrew Howroyd, Jan 02 2020
Formula
a(n) = A000720(A000073(n+1) - 1) - A000720(A000073(n)) for n >= 3. [formula edited Andrew Howroyd, Jan 02 2020]
Extensions
Terms a(26) and beyond from Andrew Howroyd, Jan 02 2020
Comments