login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A356858
a(n) is the product of the first n numbers not divisible by 5.
5
1, 1, 2, 6, 24, 144, 1008, 8064, 72576, 798336, 9580032, 124540416, 1743565824, 27897053184, 474249904128, 8536498274304, 162193467211776, 3406062811447296, 74933381851840512, 1723467782592331776, 41363226782215962624, 1075443896337615028224, 29036985201115605762048
OFFSET
0,3
COMMENTS
Unlike the factorial number n!, a(n) does not have trailing zeros.
LINKS
FORMULA
a(n) = Product_{k=1..n} A047201(k).
a(n) = A047201(n)!/(floor(A047201(n)/5)!*5^floor(A047201(n)/5)) for n > 0.
MATHEMATICA
Table[Product[Floor[(5k-1)/4], {k, n}], {n, 0, 22}] (* or *)
Join[{1}, Table[Floor[(5n-1)/4]!/(Floor[Floor[(5n-1)/4]/5]!*5^Floor[Floor[(5n-1)/4]/5]), {n, 22}]]
Join[{1}, FoldList[Times, Table[If[Mod[n, 5]==0, Nothing, n], {n, 30}]]] (* Harvey P. Dale, Nov 03 2024 *)
PROG
(Python)
from math import prod
def a(n): return prod((5*k-1)//4 for k in range(1, n+1))
print([a(n) for n in range(23)]) # Michael S. Branicky, Sep 01 2022
CROSSREFS
Cf. A356859 (number of zero digits), A356860 (number of digits), A356861 (number of nonzero digits).
Sequence in context: A013068 A326780 A365976 * A375812 A375808 A258325
KEYWORD
nonn
AUTHOR
Stefano Spezia, Sep 01 2022
STATUS
approved