A225821 a(n) = Product_{p | p is prime and p, p-1 both divide n}.
1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 10, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 10, 1, 42, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 30, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 6, 1, 10, 1, 2, 1, 42
Offset: 1
Keywords
Links
- Eric M. Schmidt, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
fa=FactorInteger; d[m_]:= Product[If[IntegerQ[m/(fa[m][[i, 1]]-1)],fa[m][[i, 1]], 1], {i, Length@fa@m}]; Table[d[n], {n, 1, 333}]
-
PARI
a(n)=my(f=factor(n)[,1]); prod(i=1,#f,if(n%(f[i]-1)==0,f[i],1)) \\ Charles R Greathouse IV, Nov 13 2013
-
Sage
def A225821(n) : return prod(p for (p,m) in factor(n) if n%(p-1)==0) # Eric M. Schmidt, Jul 31 2013
Comments