OFFSET
0,4
EXAMPLE
a(1) = 1 because there is one lucky number (1) <= 1 (1!).
a(3) = 2 because there are two lucky numbers (1, 3) <= 6 (3!).
PROG
(SageMath)
def lucky(n):
L=list(range(1, n+1, 2)); j=1
while L[j] <= len(L)-1:
L=[L[i] for i in range(len(L)) if (i+1)%L[j]!=0]
j+=1
return(L)
A000959=lucky(factorial(10))
def lucky_range(a, b):
lucky = []
for l in A000959:
if l >= b:
return lucky
if l>=a: lucky.append(l)
[ len(lucky_range(0, factorial(n)+1)) for n in range(10) ]
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Hauke Löffler, Jul 28 2019
EXTENSIONS
a(10)-a(12) from Giovanni Resta, May 10 2020
a(13) from Kevin P. Thompson, Nov 24 2021
STATUS
approved