login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309396 Number of lucky numbers <= n!. 0
1, 1, 1, 2, 7, 26, 115, 614, 3866, 28339, 237017, 2227657, 23233568, 266201749 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
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
Sequence in context: A006373 A030429 A167551 * A218670 A302691 A081566
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)