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.

A380742 Even numbers m such that the sum of the squares of the odd divisors and the sum of the squares of even divisors of m are both squares.

This page as a plain text file.
%I A380742 #20 Feb 22 2025 12:18:41
%S A380742 2,574,3346,12474,19598,19710,42770,73062,93310,133630,250510,365330,
%T A380742 425898,485758,546530,761022,782690,1254430,1460290,1628926,2139790,
%U A380742 2174018,2286954,2332798,2845154,3185870,3630146,4562510,5089394,5444010,5656770,6265870,6377618
%N A380742 Even numbers m such that the sum of the squares of the odd divisors and the sum of the squares of even divisors of m are both squares.
%C A380742 Let s2 = 4*A001157(m/2) be the sum of the squares of the even divisors of m and s1 = A050999(m) be the sum of the squares of the odd divisors of m. We observe that s2/s1 = 4.
%e A380742 574 is in the sequence because: its divisors are {1, 2, 7, 14, 41, 82, 287, 574}; the sum of squares of the odd divisors is 84100 which is square, and the sum of squares of the even divisors is 336400 which is square.
%p A380742 with(numtheory):nn:=10^7:
%p A380742 for m from 2 by 2 to nn do:
%p A380742  d:=divisors(m):
%p A380742    s1:=0: s2:=0:
%p A380742    for i in d do
%p A380742     if i::odd then s1:=s1+i^2 else s2:=s2+i^2 fi
%p A380742    od:
%p A380742    if issqr(s2) and issqr(s1) then print(m) fi
%p A380742  od:
%t A380742 Select[Range[2,10^6,2],AllTrue[{Sqrt[Total[Select[Divisors[#],OddQ]^2]],Sqrt[Total[Select[Divisors[#],EvenQ]^2]]},IntegerQ]&] (* _James C. McMahon_, Feb 10 2025 *)
%o A380742 (PARI) isok(k) = !(k%2) && issquare(sumdiv(k, d, if (d%2, d^2))) && issquare(sumdiv(k, d, if (1-d%2, d^2))); \\ _Michel Marcus_, Feb 22 2025
%Y A380742 Cf. A000203, A000593, A001157, A050999, A146076.
%K A380742 nonn
%O A380742 1,1
%A A380742 _Michel Lagneau_, Jan 31 2025