OFFSET
1,2
COMMENTS
a(a(n)) = a(n); a(A037074(n)) = 1.
a(n) = 1 iff n = A074480(k) for some k.
a(n) mod A037074(k) > 0 for all k. - Reinhard Zumkeller, Jan 29 2008
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
a(30)=a(2*3*5)=2*1=2; a(105)=a(3*5*7)=1*7=7; a(143)=a(11*13)=1; a(225)=a(3*3*5*5)=a((3*5)*(3*5))=1*1=1; a(525)=a(3*5*5*7)=a((3*5)*(5*7))=1*1=1.
MATHEMATICA
a[n_] := Times @@ (Flatten[ (Table[#[[1]], {#[[2]]}] & ) /@ FactorInteger[n]] //. {p1___, p2_, p3_, p4___} /; p3 == p2 + 2 -> {p1, p4}); Table[a[n], {n, 1, 74}](* Jean-François Alcover, Nov 04 2011 *)
PROG
(PARI) a(n)=my(f=factor(n), t); for(i=2, #f[, 1], if(f[i-1, 1]+2==f[i, 1], t=min(f[i-1, 2], f[i, 2]); f[i-1, 2]-=t; f[i, 2]-=t)); factorback(f) \\ Charles R Greathouse IV, Nov 04 2011
(Haskell)
a072965 n = f 1 (a027746_row n) where
f y [] = y
f y [p] = p * y
f y (2:ps) = f (2 * y) ps
f y (3:5:_) = a072965 (n `div` 15)
f y (p:qs@(q:ps)) | q == p + 2 = f y ps
| otherwise = f (p * y) qs
-- Reinhard Zumkeller, Oct 31 2012
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
Reinhard Zumkeller, Aug 20 2002
STATUS
approved