|
|
A170818
|
|
a(n) is the product of primes (with multiplicity) of form 4*k+1 that divide n.
|
|
10
|
|
|
1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 13, 1, 5, 1, 17, 1, 1, 5, 1, 1, 1, 1, 25, 13, 1, 1, 29, 5, 1, 1, 1, 17, 5, 1, 37, 1, 13, 5, 41, 1, 1, 1, 5, 1, 1, 1, 1, 25, 17, 13, 53, 1, 5, 1, 1, 29, 1, 5, 61, 1, 1, 1, 65, 1, 1, 17, 1, 5, 1, 1, 73, 37, 25, 1, 1, 13, 1, 5, 1, 41, 1, 1, 85, 1, 29, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
Completely multiplicative with a(p) = p if p = 4k+1 and a(p) = 1 otherwise. - Tom Edgar, Mar 05 2015
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
a:= n-> mul(`if`(irem(i[1], 4)=1, i[1]^i[2], 1), i=ifactors(n)[2]):
|
|
MATHEMATICA
|
a[n_] := Product[{p, e} = pe; If[Mod[p, 4] == 1, p^e, 1], {pe, FactorInteger[n]}];
|
|
PROG
|
(PARI) a(n)=my(f=factor(n)); prod(i=1, #f~, if(f[i, 1]%4>1, 1, f[i, 1])^f[i, 2]) \\ Charles R Greathouse IV, Jun 28 2015
(Python)
from sympy import factorint, prod
def a072438(n):
f = factorint(n)
return 1 if n == 1 else prod(i**f[i] for i in f if i % 4 != 1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|