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.

A131354 Number of primes in the open interval between successive tribonacci numbers.

This page as a plain text file.
%I A131354 #19 Apr 10 2020 10:23:16
%S A131354 0,0,0,0,1,1,1,3,5,8,12,23,38,61,109,179,312,537,920,1598,2779,4835,
%T A131354 8461,14784,25984,45696,80505,142165,251300,444930,788828,1400756,
%U A131354 2489594,4430712,7892037,14073786,25118167,44869652,80223172,143535369,257014148,460524864,825732764
%N A131354 Number of primes in the open interval between successive tribonacci numbers.
%C A131354 This is to tribonacci numbers A000073 as A052011 is to Fibonacci numbers and as A052012 is to Lucas numbers A000204. It is mere coincidence that all values until a(12) = 38 are themselves Fibonacci. The formula plus the known asymptotic prime distribution gives the asymptotic approximation of this sequence, which is the same even if we use one of the alternative definitions of tribonacci with different initial values.
%F A131354 a(n) = A000720(A000073(n+1) - 1) - A000720(A000073(n)) for n >= 3. [formula edited _Andrew Howroyd_, Jan 02 2020]
%e A131354 Between Trib(8)=24 and Trib(9)=44 we find the following primes: 29, 31, 37, 41, 43, hence a(8)=5.
%p A131354 A131354 := proc(n)
%p A131354     a := 0 ;
%p A131354     for k from 1+A000073(n)  to A000073(n+1)-1 do
%p A131354         if isprime(k) then
%p A131354             a := a+1 ;
%p A131354         end if;
%p A131354     end do;
%p A131354     a ;
%p A131354 end proc: # _R. J. Mathar_, Dec 14 2011
%t A131354 trib[n_] := SeriesCoefficient[x^2/(1 - x - x^2 - x^3), {x, 0, n}];
%t A131354 a[n_] := PrimePi[trib[n + 1] - 1] - PrimePi[trib[n]];
%t A131354 a /@ Range[0, 42] (* _Jean-François Alcover_, Apr 10 2020 *)
%o A131354 (PARI) \\ here b(n) is A000073(n).
%o A131354 b(n)={polcoef(x^2/(1-x-x^2-x^3) + O(x*x^n), n)}
%o A131354 a(n)={primepi(b(n+1)-1) - primepi(b(n))} \\ _Andrew Howroyd_, Jan 02 2020
%Y A131354 Cf. A000073, A000720, A092836, A052011, A052012, A056816.
%K A131354 nonn
%O A131354 0,8
%A A131354 _Jonathan Vos Post_, Oct 21 2007
%E A131354 Terms a(26) and beyond from _Andrew Howroyd_, Jan 02 2020