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.

Showing 1-2 of 2 results.

A093888 Largest palindromic divisor of n!.

Original entry on oeis.org

1, 1, 2, 6, 8, 8, 9, 252, 252, 252, 48384, 48384, 48384, 48384, 525525, 525525, 525525, 595595, 595595, 969969, 969969, 969969, 405909504, 5273993725, 5273993725, 5273993725, 5273993725, 5273993725, 5273993725, 5273993725, 5273993725, 290826628092, 290826628092, 290826628092
Offset: 0

Views

Author

Amarnath Murthy, Apr 23 2004

Keywords

Comments

As positive palindromes do not end in 0 terms are not a multiple of 10. - David A. Corneth, Oct 07 2022

Examples

			a(8) = 252 as 252 is the largest palindrome that divides 8! = 40320.
		

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Reverse[Divisors[n!]],PalindromeQ],{n,30}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 19 2020 *)
  • PARI
    a(n) = { res = 1; my(d = divisors(n! >> val(n, 2))); forstep(i = #d, 1, -1, if(ispal(d[i]), res = d[i]; break; ) ); d = divisors(n! / 5^val(n, 5)); forstep(i = #d, 1, -1, if(d[i] < res, return(res); ); if(ispal(d[i]), res = d[i]; break; ) ); res }
    ispal(n) = my(d = digits(n)); d == Vecrev(d)
    val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Oct 07 2022
    
  • Python
    from sympy import divisors, factorial, multiplicity
    def ispal(n): s = str(n); return s == s[::-1]
    def b(n, k): f = factorial(n); return f//k**multiplicity(k, f)
    def a(n):
        m2 = max(d for d in divisors(b(n, 2), generator=True) if ispal(d))
        m5 = max(d for d in divisors(b(n, 5), generator=True) if ispal(d))
        return max(m2, m5)
    print([a(n) for n in range(34)]) # Michael S. Branicky, Oct 12 2022 after David A. Corneth

Formula

a(n) = A093030(A000142(n)). - Michel Marcus, Oct 12 2022

Extensions

More terms from Jason Earls, May 07 2004
a(0) and more terms from David A. Corneth, Oct 07 2022

A114340 Largest palindromic divisor of n!! (double factorial = A006882(n)).

Original entry on oeis.org

1, 2, 3, 8, 5, 8, 7, 8, 9, 8, 99, 9, 9009, 252, 9009, 252, 9009, 48384, 969969, 48384, 969969, 405504, 969969, 405504, 969969, 405504, 969969, 525525, 969969, 525525, 79833897, 525525, 133464331, 595595, 5273993725, 595595
Offset: 1

Views

Author

Giovanni Resta, Feb 07 2006

Keywords

Examples

			a(16)=252 since 252 is the largest palindromic factor of 16!!= 10321920=252* 40960.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_]:= n == FromDigits@Reverse@IntegerDigits@n; Array[Max[Select[Divisors[ #!! ], palQ]] &, 40]

Formula

a(n) = A093030(A006882(n)). - Michel Marcus, Oct 13 2022
Showing 1-2 of 2 results.