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.

A309396 Number of lucky numbers <= n!.

Original entry on oeis.org

1, 1, 1, 2, 7, 26, 115, 614, 3866, 28339, 237017, 2227657, 23233568, 266201749
Offset: 0

Views

Author

Hauke Löffler, Jul 28 2019

Keywords

Examples

			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!).
		

Crossrefs

Programs

  • 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) ]

Extensions

a(10)-a(12) from Giovanni Resta, May 10 2020
a(13) from Kevin P. Thompson, Nov 24 2021