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.

A199857 Numbers such that the sum of the squares of the largest and the smallest prime divisor equals the sum of the squares of the other distinct prime divisors.

This page as a plain text file.
%I A199857 #31 May 14 2023 02:33:43
%S A199857 24871,81719,81809,88711,174097,198679,201761,256151,273581,290191,
%T A199857 329681,405449,422807,428281,472549,572663,592999,604279,620977,
%U A199857 701561,728119,752191,770431,876641,898909,1011839,1063517,1121729,1178879,1218679,1251439,1389223
%N A199857 Numbers such that the sum of the squares of the largest and the smallest prime divisor equals the sum of the squares of the other distinct prime divisors.
%H A199857 Amiram Eldar, <a href="/A199857/b199857.txt">Table of n, a(n) for n = 1..10000</a>
%e A199857 24871 is in the sequence because the prime distinct divisors are {7, 11, 17, 19} and 19^2 + 7^2 = 11^2 + 17^2 = 410.
%e A199857 Although the early terms are all odd with four distinct prime factors, 7212590 = 2 * 5 * 7 * 11 * 17 * 19 * 29 has seven distinct prime factors, and 2^2 + 29^2 = 5^2 + 7^2 + 11^2 + 17^2 + 19^2 = 845. - _D. S. McNeil_, Nov 12 2011
%p A199857 isA199857 := proc(n)
%p A199857 local p;
%p A199857 p := sort(convert((numtheory[factorset](n)), list)) ;
%p A199857 if nops(p) >= 3 then
%p A199857 return ( op(1, p)^2 + op(-1, p)^2 = add(op(i, p)^2, i=2..nops(p)-1) ) ;
%p A199857 else
%p A199857 false;
%p A199857 end if;
%p A199857 end proc:
%p A199857 for n from 2 to 1500000 do
%p A199857 if isA199857(n) then
%p A199857 printf("%d, ", n) ;
%p A199857 end if ;
%p A199857 end do: # program from _R. J. Mathar_ adapted for this sequence - see A199745
%t A199857 Select[Range[1400000], Plus@@((pl=First/@FactorInteger[#])^2/2) == pl[[1]]^2+pl[[-1]]^2&] (* program from _Ray Chandler_ adapted for this sequence - see A199745 *)
%Y A199857 Cf. A199745.
%K A199857 nonn
%O A199857 1,1
%A A199857 _Michel Lagneau_, Nov 11 2011