OFFSET
2,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 2..2051
A. Vardy, Comments and C program
FORMULA
a(n) = 1 if n is prime.
Let n = Product_{i=1..m} p_i^e_i be the prime factorization of n. For p prime and integers k, q, define N(k, p, q) = p^(Sum_{j=0..k-1} b(j)) where b(j) is the largest integer b in {0, 1, 2, ..., q} such that p^b divides j!. Then a(n) = Product_{i=1..m} N(S(n), p_i, e_i) where S(n) is the n-th Kempner number (sequence A002034), i.e., S(n) is the smallest integer k such that n divides k!. - Navin Kashyap (nkashyap(AT)ece.ucsd.edu), Aug 07 2002
EXAMPLE
a(6)=2 because there are exactly two minimal annihilator polynomials over Z_6, namely X^3 + 5x and X^3 + 3x^2 + 2x.
MATHEMATICA
A002034[n_] := Module[ {m = 1}, While[ !IntegerQ[m!/n], m++]; m]; b[j_, p_, q_] := Module[ {m = q}, While[ !Divisible[j!, p^m], m--]; m]; nn[k_, p_, q_] := p^Sum[b[j, p, q], {j, 0, k-1}]; a[n_?PrimeQ] = 1; a[n_] := Module[ {fi, m, pp, ee}, fi = FactorInteger[n]; m = Length[fi]; pp = fi[[All, 1]]; ee = fi[[All, 2]]; Product[ nn[ A002034[n], pp[[i]], ee[[i]]], {i, 1, m}]]; Table[ a[n], {n, 2, 50}] (* Jean-François Alcover, Dec 19 2011, after Navin Kashyap *)
PROG
(PARI)
A002034(n) = if(1==n, n, my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ From A002034
A069098auxN(k, p, q) = { my(s=0); for(j=0, k-1, forstep(b=q, 0, -1, if(0==lift(Mod(j!, (p^b))), s += b; break))); (p^s); };
A069098(n) = { my(f=factor(n), K=A002034(n)); prod(i=1, #f~, A069098auxN(K, f[i, 1], f[i, 2])); }; \\ Antti Karttunen, Oct 09 2018
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Alexander Vardy (vardy(AT)montblanc.ucsd.edu), Apr 05 2002
EXTENSIONS
More terms from Navin Kashyap (nkashyap(AT)ece.ucsd.edu), Aug 07 2002
Data section further extended by Antti Karttunen, Oct 09 2018
STATUS
approved