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-3 of 3 results.

A309333 The number of primes between two consecutive lucky primes, bounds excluded.

Original entry on oeis.org

1, 1, 4, 0, 1, 4, 1, 0, 8, 4, 1, 5, 2, 0, 4, 7, 1, 3, 2, 2, 6, 1, 1, 5, 2, 6, 5, 3, 1, 1, 0, 1, 4, 6, 1, 4, 1, 4, 9, 5, 7, 0, 0, 2, 2, 5, 1, 3, 0, 8, 4, 1, 5, 2, 18, 0, 9, 3, 1, 1, 9, 2, 4, 5, 3, 2, 6, 5, 4, 9, 3, 4, 11, 1, 1, 3, 4, 20, 0, 8, 2, 4, 3, 3, 15, 6
Offset: 1

Views

Author

Hauke Löffler, Jul 24 2019

Keywords

Examples

			a(1): Between the first two lucky primes (3, 7) there is one prime (5).
a(3): Between 13 and 31 there are 4 primes (17, 19, 23, 29).
		

Crossrefs

Programs

  • SageMath
    def count_primes_between(a, b):
      return len(prime_range(a+1, b))
    [count_primes_between(A031157[i], A031157[i+1]) for i in range (len(A031157[0:20])-1)]

A307499 The number of primes between two consecutive prime Lucas numbers, bounds excluded.

Original entry on oeis.org

0, 1, 0, 4, 4, 30, 51, 230, 170, 657, 216347, 3009722, 16603784, 288244979, 4566061654, 192922096576, 20592039889787, 854140717540139, 7734073644382760578105
Offset: 1

Views

Author

Hauke Löffler, Jul 24 2019

Keywords

Examples

			a(0): between the first two prime Lucas numbers (2,3) there are 0 primes.
a(3): between 11 and 29 there are 4 primes (13, 17, 19, 23).
		

Crossrefs

Programs

  • Mathematica
    Differences@ PrimePi@ Select[LucasL@ Range[0, 70], PrimeQ] - 1 (* Giovanni Resta, Jul 28 2019 *)
  • SageMath
    # uses[A005479]
    def count_primes_between(a, b):
        return len(prime_range(a+1, b))
    [count_primes_between(A005479[i], A005479[i+1]) for i in range(len(A005479)-1)]

Extensions

a(14)-a(18) from Giovanni Resta, Jul 28 2019
a(19) using Kim Walisch's primecount, from Amiram Eldar, May 14 2023

A309321 The number of primes between two consecutive palindromic primes, bounds excluded.

Original entry on oeis.org

0, 0, 0, 0, 20, 5, 3, 5, 0, 21, 5, 2, 1, 52, 4, 3, 0, 17, 0, 1104, 21, 7, 73, 9, 105, 35, 8, 54, 51, 11, 34, 43, 78, 8, 52, 29, 19, 10, 80, 50, 22, 33, 78, 53, 9, 994, 11, 17, 26, 7, 20, 49, 75, 12, 109, 100, 27, 16, 12, 16, 32, 48, 28, 69, 32, 42, 6, 56, 48
Offset: 1

Views

Author

Hauke Löffler, Jul 23 2019

Keywords

Examples

			a(0): Between the first two palindromic primes (2,3) there are 0 primes.
a(6): Between 101 and 131 there are 5 primes (103, 107, 109, 113, 127).
		

Crossrefs

Programs

  • SageMath
    #Palindromic primes
    def count_primes_between(a,b):
        return len(prime_range(a+1,b))
    [count_primes_between(A002385[i],A002385[i+1]) for i in range (len(A002385)-1)]
    # Alternative:
    def A309321list(bound):
        L = []; p = 2
        while p < bound:
            p = next_prime(p)
            delta = 0
            while not Word(p.digits()).is_palindrome():
                delta += 1
                p = next_prime(p)
            L.append(delta)
        return L
    A309321list(18181) # Peter Luschny, Jul 23 2019

Formula

a(n) = A075807(n+1) - A075807(n) - 1. - Jinyuan Wang, Jul 24 2019
Showing 1-3 of 3 results.