cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A363340 a(n) is the smallest positive integer such that a(n) * n is the sum of two squares.

This page as a plain text file.
%I A363340 #28 Aug 07 2023 08:00:19
%S A363340 1,1,3,1,1,3,7,1,1,1,11,3,1,7,3,1,1,1,19,1,21,11,23,3,1,1,3,7,1,3,31,
%T A363340 1,33,1,7,1,1,19,3,1,1,21,43,11,1,23,47,3,1,1,3,1,1,3,11,7,57,1,59,3,
%U A363340 1,31,7,1,1,33,67,1,69,7,71,1,1,1,3,19,77,3,79
%N A363340 a(n) is the smallest positive integer such that a(n) * n is the sum of two squares.
%C A363340 Using Fermat's two-squares theorem it is easy to see that a(n) is the product of all prime factors of n that are congruent to 3 modulo 4 and have an odd exponent.
%C A363340 This implies that a(n) is also the smallest positive integer such that n / a(n) is the sum of two squares.
%C A363340 Equivalently, a(n) is the product of all primes of the form 4k+3 that divide the squarefree part of n. If we use the squarefree kernel instead, we get A170819. - _Peter Munn_, Aug 06 2023
%F A363340 Multiplicative with a(p^e) = p if p^e == 3 (mod 4), otherwise 1. - _Peter Munn_, Jul 03 2023
%F A363340 From _Peter Munn_, Aug 06 2023: (Start)
%F A363340 a(n) = A007913(A097706(n)) = A097706(A007913(n)).
%F A363340 a(n) == A000265(n) (mod 4).
%F A363340 a(A059897(n, k)) = A059897(a(n), a(k)).
%F A363340 (End)
%e A363340 a(1) = a(2) = 1 since 1 and 2 are sums of two squares.
%e A363340 a(3) = 3 since 3 and 6 are not sums of two squares but 3*3 is.
%e A363340 a(6) = 3 since 6 and 12 are not sums of two squares but 3*6 = 3^2 + 3^2.
%o A363340 (PARI) a(n) = my(r=1); foreach(mattranspose(factor(n)), f, if(f[1]%4==3&&f[2]%2==1, r*=f[1])); r
%Y A363340 Cf. A001481 (positions of 1's), A167181 (range of values).
%Y A363340 Fixed points: A167181.
%Y A363340 Cf. A000265, A002145, A007913, A059897, A097706, A170819.
%K A363340 nonn,easy,mult
%O A363340 1,3
%A A363340 _Peter Schorn_, May 28 2023