|
|
A371015
|
|
The largest divisor of n that is the sum of 2 squares.
|
|
2
|
|
|
1, 2, 1, 4, 5, 2, 1, 8, 9, 10, 1, 4, 13, 2, 5, 16, 17, 18, 1, 20, 1, 2, 1, 8, 25, 26, 9, 4, 29, 10, 1, 32, 1, 34, 5, 36, 37, 2, 13, 40, 41, 2, 1, 4, 45, 2, 1, 16, 49, 50, 17, 52, 53, 18, 5, 8, 1, 58, 1, 20, 61, 2, 9, 64, 65, 2, 1, 68, 1, 10, 1, 72, 73, 74, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(p^e) = p^(2*floor(e/2)) if p == 3 (mod 4), and p^e otherwise.
a(n) = n if and only if n is in A001481.
a(n) = 1 if and only if n is in A167181.
|
|
MATHEMATICA
|
f[p_, e_] := If[Mod[p, 4] == 3, p^(2*Floor[e/2]), p^e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^if(f[i, 1]%4 == 3, 2*(f[i, 2]\2), f[i, 2])); }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|