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-2 of 2 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)]

A309381 Lucky primes k such that k+6 is also a lucky prime.

Original entry on oeis.org

7, 31, 37, 67, 73, 613, 991, 1087, 1117, 2467, 3301, 3307, 3607, 4561, 4987, 4993, 6367, 6373, 8263, 8641, 9643, 10903, 11827, 11953, 12373, 12547, 15187, 15901, 17047, 18043, 19603, 20353, 21751, 23671, 25147, 28837, 31033, 31231, 37957, 38707, 38917, 43201, 44383, 46021, 49627
Offset: 1

Views

Author

Robert Israel, Jul 26 2019

Keywords

Comments

A031157(k) for k such that A309334(k)=6.
The minimum gap between lucky primes (after the first) is 6.

Examples

			37 and 37+6=43 are both lucky primes, so 37 is in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 10^5: # for terms <= N
    L:= [seq(i,i=1..N+6,2)]:
    for n from 2 while n < nops(L) do
      r:= L[n];
      L:= subsop(seq(r*i=NULL, i=1..nops(L)/r), L);
    od:
    L:= convert(select(isprime,L),set):
    A:= L intersect map(`-`,L,6):
    sort(convert(A,list));
Showing 1-2 of 2 results.