The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A371015 The largest divisor of n that is the sum of 2 squares. 2

%I #7 Mar 08 2024 08:09:16

%S 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,

%T 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,

%U 8,1,58,1,20,61,2,9,64,65,2,1,68,1,10,1,72,73,74,25

%N The largest divisor of n that is the sum of 2 squares.

%H Amiram Eldar, <a href="/A371015/b371015.txt">Table of n, a(n) for n = 1..10000</a>

%F Multiplicative with a(p^e) = p^(2*floor(e/2)) if p == 3 (mod 4), and p^e otherwise.

%F a(n) = n / A363340(n).

%F a(n) = n if and only if n is in A001481.

%F a(n) = 1 if and only if n is in A167181.

%t 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]

%o (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]));}

%Y Cf. A001481, A167181, A363340, A371014.

%K nonn,easy,mult

%O 1,2

%A _Amiram Eldar_, Mar 08 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 02:29 EDT 2024. Contains 372720 sequences. (Running on oeis4.)