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!)
A117481 a(n) = n*(n-1)*(n-2)*(n-3)*...*(n-k) such that (n-k) is the largest prime smaller than n. 1
1, 2, 6, 12, 60, 30, 210, 56, 504, 5040, 55440, 132, 1716, 182, 2730, 43680, 742560, 306, 5814, 380, 7980, 175560, 4037880, 552, 13800, 358800, 9687600, 271252800, 7866331200, 870, 26970, 992, 32736, 1113024, 38955840, 1402410240, 51889178880 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Product_{k = prevprime(n)..n} k, for n>=3 with a(1)=1, a(2)=2 and where prevprime = A151799. - Wesley Ivan Hurt, Dec 12 2021
EXAMPLE
a(10) = 10*9*8*7 = 5040 because 7 is the largest prime smaller than 10.
MATHEMATICA
a[1] = 1; a[2] = 2; a[n_] := n!/(NextPrime[n, -1] - 1)!; Array[a, 30] (* Amiram Eldar, Feb 08 2021 *)
PROG
(PARI) a(n) = if (n<=2, n, prod(k=0, n-precprime(n-1), n-k)); \\ Michel Marcus, Feb 09 2021
CROSSREFS
Cf. A151799 (prevprime v.2), A286900 (sum of the numbers from n to nextprime(n)).
Sequence in context: A002805 A231693 A232112 * A343277 A341617 A083268
KEYWORD
nonn,look
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 25 2006
EXTENSIONS
Offset and a(36) corrected by Amiram Eldar, Feb 08 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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)