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.
%I A189788 #45 Sep 01 2021 03:59:31 %S A189788 9,1,1,1,1,1,1,1,1,1,10,110,1110,11110,111110,1111110,11111110, %T A189788 111111110,1111111110,11111111110,111111111100,1111111111100, %U A189788 11111111111100,111111111111100,1111111111111100,11111111111111100,111111111111111100,1111111111111111100,11111111111111111100,111111111111111111100,1111111111111111111000 %N A189788 Base-10 lunar factorials: a(n) = (lunar) Product_{i=1..n} i. %C A189788 0!, the empty product, equals 9 (the multiplicative identity) by convention. %H A189788 M. F. Hasler, <a href="/A189788/b189788.txt">Table of n, a(n) for n = 0..200</a> %H A189788 D. Applegate, M. LeBrun and N. J. A. Sloane, <a href="http://arxiv.org/abs/1107.1130">Dismal Arithmetic</a>, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing] %H A189788 D. Applegate, M. LeBrun and N. J. A. Sloane, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Sloane/carry2.html">Dismal Arithmetic</a>, J. Int. Seq. 14 (2011) # 11.9.8. %H A189788 <a href="/index/Di#dismal">Index entries for sequences related to dismal (or lunar) arithmetic</a> %e A189788 4! = 1 X 2 X 3 X 4 = 1, where X is lunar multiplication, A087062. %o A189788 (PARI) apply( A189788(n)=if(n>9,for(k=10,n-1,n=A087062(n,k));n,9^!n), [0..30]) \\ _M. F. Hasler_, Nov 15 2018 %o A189788 (Python) # uses lunar_mul and lunar_add from A087062 %o A189788 from functools import reduce %o A189788 def a(n): return reduce(lunar_mul, [9]+list(range(1, n+1))) %o A189788 print([a(n) for n in range(31)]) # _Michael S. Branicky_, Sep 01 2021 %o A189788 (Python) # uses lunar_mul and lunar_add from A087062 %o A189788 from itertools import accumulate %o A189788 def aupton(nn): return list(accumulate([9]+list(range(1, nn+1)), lunar_mul)) %o A189788 print(aupton(30)) # _Michael S. Branicky_, Sep 01 2021 %Y A189788 Cf. A087062 (lunar product), A087019 (lunar squares). %K A189788 nonn,base %O A189788 0,1 %A A189788 _N. J. A. Sloane_, May 23 2011 %E A189788 a(0) = 9 prepended and minor edits by _M. F. Hasler_, Nov 15 2018