OFFSET
1,3
COMMENTS
Largest term of A004614 that divides n. - Peter Munn, Apr 15 2021
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
a:= n-> mul(`if`(irem(i[1], 4)=3, i[1]^i[2], 1), i=ifactors(n)[2]):
seq(a(n), n=1..100); # Alois P. Heinz, Jun 09 2014
MATHEMATICA
a[n_] := Product[{p, e} = pe; If[Mod[p, 4] == 3, p^e, 1], {pe, FactorInteger[n]}]; Array[a, 100] (* Jean-François Alcover, Jun 16 2015, updated May 29 2019 *)
PROG
(PARI) a(n)=local(f); f=factor(n); prod(k=1, matsize(f)[1], if(f[k, 1]%4<>3, 1, f[k, 1]^f[k, 2]))
(Python)
from sympy import factorint
from operator import mul
def a072436(n):
f=factorint(n)
return 1 if n == 1 else reduce(mul, [1 if i%4==3 else i**f[i] for i in f])
def a(n): return n/a072436(n) # Indranil Ghosh, May 08 2017
(Python)
from math import prod
from sympy import factorint
def A097706(n): return prod(p**e for p, e in factorint(n).items() if p & 3 == 3) # Chai Wah Wu, Jun 28 2022
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
Ralf Stephan, Aug 30 2004
STATUS
approved