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.

A093889 a(n) = n!/A093888(n).

This page as a plain text file.
%I A093889 #15 Oct 13 2022 16:35:59
%S A093889 1,1,1,1,3,15,80,20,160,1440,75,825,9900,128700,165888,2488320,
%T A093889 39813120,597196800,10749542400,125411328000,2508226560000,
%U A093889 52672757760000,2769091920000,4901791334400,117642992025600,2941074800640000,76467944816640000,2064634510049280000,57809766281379840000,1676483222160015360000
%N A093889 a(n) = n!/A093888(n).
%e A093889 a(4) = 3 as the largest palindromic divisor of 4! comes from the set {1, 2, 3, 4, 6, 8, 12, 24}. The largest palindrome is this set is 8 so a(4) = 4! / 8 = 3. - _David A. Corneth_, Oct 12 2022
%o A093889 (Python)
%o A093889 from sympy import divisors, factorial, multiplicity
%o A093889 def ispal(n): s = str(n); return s == s[::-1]
%o A093889 def b(f, k): return f//k**multiplicity(k, f)
%o A093889 def a(n):
%o A093889     f = factorial(n)
%o A093889     m2 = max(d for d in divisors(b(f, 2), generator=True) if ispal(d))
%o A093889     m5 = max(d for d in divisors(b(f, 5), generator=True) if ispal(d))
%o A093889     return f//max(m2, m5)
%o A093889 print([a(n) for n in range(34)]) # _Michael S. Branicky_, Oct 12 2022
%Y A093889 Cf. A000142, A093888.
%K A093889 nonn,base
%O A093889 0,5
%A A093889 _Amarnath Murthy_, Apr 23 2004
%E A093889 Corrected and extended by _Jason Earls_, May 07 2004
%E A093889 a(0) and more terms from _David A. Corneth_, Oct 07 2022