OFFSET
1,15
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 0 because between the first two primes (2,3) there are no lucky numbers.
a(4) = 1 because between 7 and 1 there is one lucky number (9).
a(15) = 2 because between 47 and 53 there are two lucky numbers (49, 51).
MAPLE
# uses[A000959List]
A309367List := proc(mx) local L, j;
L := convert(A000959List(ithprime(mx)), set):
j := n -> {seq(k, k = [$ithprime(n)+1..ithprime(n+1)-1])}:
seq(nops(j(n) intersect L), n = 1..mx) end:
A309367List(87); # Peter Luschny, Mar 27 2020
PROG
(Sage) # uses[lucky from A000959]
def lucky_range(a, b):
return [l for l in lucky(b) if a <= l < b]
P = prime_range(250)
[len(lucky_range(P[i]+1, P[i+1])) for i in range(len(P)-1)]
CROSSREFS
KEYWORD
nonn
AUTHOR
Hauke Löffler, Jul 25 2019
STATUS
approved