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.

Showing 1-4 of 4 results.

A277062 Number of primes <= n-th Lucas number.

Original entry on oeis.org

1, 0, 2, 2, 4, 5, 7, 10, 15, 21, 30, 46, 66, 98, 146, 218, 329, 500, 757, 1158, 1766, 2716, 4164, 6420, 9907, 15320, 23760, 36878, 57356, 89288, 139283, 217506, 340059, 532321, 834147, 1308186, 2053958, 3227229, 5075229, 7987852, 12581575, 19831014
Offset: 0

Views

Author

Vincenzo Librandi, Nov 09 2016

Keywords

Crossrefs

Programs

  • Magma
    [#PrimesUpTo(Lucas(n)): n in [0..41]];
  • Maple
    a:= n-> numtheory[pi]((<<0|1>, <1|1>>^n. <<2, 1>>)[1$2]):
    seq(a(n), n=0..35);  # Alois P. Heinz, Nov 09 2016
  • Mathematica
    Table[PrimePi[LucasL[n]], {n, 0, 50}]

Formula

a(n) = A000720(A000032(n)). - Michel Marcus, Jun 10 2024

A052011 Number of primes between successive Fibonacci numbers exclusive.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 7, 10, 16, 23, 37, 55, 84, 125, 198, 297, 458, 704, 1087, 1673, 2602, 4029, 6263, 9738, 15186, 23704, 36981, 57909, 90550, 142033, 222855, 349862, 549903, 865019, 1361581, 2145191, 3381318, 5334509, 8419527, 13298630
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Comments

With the given sequence data, we see that neither endpoint is included, so we count primes p in the open interval F(n)Jeppe Stig Nielsen, Jun 06 2015

Examples

			Between Fib(9)=34 and Fib(10)=55 we find the following primes: 37, 41, 43, 47 and 53 hence a(9)=5.
		

Crossrefs

Cf. A000040, A001605, A005478 (endpoint primes), A010051, A052012, A054782.

Programs

  • Haskell
    a052011 n = a052011_list !! (n-1)
    a052011_list = c 0 0 $ drop 2 a000045_list where
      c x y fs'@(f:fs) | x < f     = c (x+1) (y + a010051 x) fs'
                       | otherwise = y : c (x+1) 0 fs
    -- Reinhard Zumkeller, Dec 18 2011
    
  • Maple
    for n from 1 to 43 do T[n]:= numtheory:-pi(combinat:-fibonacci(n)) od:
    seq(T[n]-T[n-1]-`if`(isprime(combinat:-fibonacci(n)),1,0), n=2..43); # Robert Israel, Jun 08 2015
  • Mathematica
    lst={};Do[p=0;Do[If[PrimeQ[a],p++ ],{a,Fibonacci[n]+1,Fibonacci[n+1]-1}];AppendTo[lst,p],{n,50}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 23 2009 *)
    pbf[n_]:=Module[{fib1=If[PrimeQ[Fibonacci[n+1]],PrimePi[Fibonacci[n+1]-1], PrimePi[ Fibonacci[n+1]]], fib0=If[PrimeQ[Fibonacci[n]], PrimePi[ Fibonacci[n]+1],PrimePi[Fibonacci[n]]]},Max[0,fib1-fib0]]; Array[pbf,50] (* Harvey P. Dale, Mar 01 2012 *)
  • PARI
    a(n)=my(s); forprime(p=fibonacci(n)+1,fibonacci(n+1)-1,s++); s \\ Charles R Greathouse IV, Jun 08 2015

Formula

a(n) = pi(F(n+1)-1) - pi(F(n)) = A000720(A000045(n+1)-1) - A000720(A000045(n)). - Jonathan Vos Post, Mar 08 2010; corrected by Jeppe Stig Nielsen, Jun 06 2015
a(n) ~ phi^(n-1)/(n*sqrt(5)*log(phi)), where phi = (1+sqrt(5))/2 is the golden ratio. - Charles R Greathouse IV, Jun 08 2015
a(n) = A054782(n+1) - A054782(n) - [n+1 in A001605], where [] denotes the Iverson bracket. - Amiram Eldar, Jun 10 2024

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

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Oct 21 2007

Keywords

Comments

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.

Examples

			Between Trib(8)=24 and Trib(9)=44 we find the following primes: 29, 31, 37, 41, 43, hence a(8)=5.
		

Crossrefs

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

A130973 Number of primes between successive pairs of twin primes, for a(n) > 0.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 4, 2, 1, 3, 1, 2, 3, 10, 4, 7, 4, 3, 2, 1, 2, 18, 2, 2, 17, 1, 2, 6, 9, 3, 1, 1, 1, 8, 3, 2, 15, 1, 4, 1, 1, 7, 7, 4, 4, 3, 4, 1, 1, 7, 2, 5, 1, 5, 18, 2, 5, 4, 3, 1, 5, 1, 18, 12, 2, 8, 1, 4, 2, 5, 4, 1, 1, 1, 9, 10
Offset: 1

Views

Author

Omar E. Pol, Aug 23 2007

Keywords

Comments

a(k) corresponds to the k-th term in the isolated prime sequence A007510 or A134797. a(1) corresponds to 23. a(2) corresponds to 37. a(3) corresponds to 47 and 53. - Enrique Navarrete, Jan 28 2017
Lengths of the runs of consecutive integers in A176656. - R. J. Mathar, Feb 19 2017

Crossrefs

Cf. A001223, A007510 (isolated primes), A027883, A048614, A048198, A052011, A052012, A061273, A076777, A073784, A082602, A088700, A179067 (clusters of twin primes).
Showing 1-4 of 4 results.