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.

A306358 Odd numbers which are the sum of two squares in two or more different ways.

This page as a plain text file.
%I A306358 #11 Sep 10 2022 02:22:04
%S A306358 25,65,85,125,145,169,185,205,221,225,265,289,305,325,365,377,425,445,
%T A306358 481,485,493,505,533,545,565,585,625,629,685,689,697,725,745,765,785,
%U A306358 793,841,845,865,901,905,925,949,965,985,1025,1037,1073,1105,1125,1145,1157,1165,1189,1205,1225,1241
%N A306358 Odd numbers which are the sum of two squares in two or more different ways.
%C A306358 Odd terms of A118882.
%C A306358 Odd numbers k such that A000161(k) >= 2.
%e A306358 The decompositions of the first terms are
%e A306358 25: [[4, 3], [5, 0]]
%e A306358 65: [[7, 4], [8, 1]]
%e A306358 85: [[7, 6], [9, 2]]
%e A306358 125: [[10, 5], [11, 2]]
%e A306358 145: [[9, 8], [12, 1]]
%e A306358 169: [[12, 5], [13, 0]]
%e A306358 185: [[11, 8], [13, 4]]
%e A306358 205: [[13, 6], [14, 3]]
%e A306358 221: [[11, 10], [14, 5]]
%e A306358 225: [[12, 9], [15, 0]]
%e A306358 265: [[12, 11], [16, 3]]
%e A306358 289: [[15, 8], [17, 0]]
%e A306358 305: [[16, 7], [17, 4]]
%e A306358 325: [[15, 10], [17, 6], [18, 1]]
%e A306358 365: [[14, 13], [19, 2]]
%e A306358 377: [[16, 11], [19, 4]]
%o A306358 (PARI) A000161(n)=sum(k=sqrtint((n-1)\2)+1, sqrtint(n), issquare(n-k^2));
%o A306358 is(n)=if(n%2==1, A000161(n)>1, 0);
%o A306358 select(is,vector(1300,n,n))
%o A306358 (Python)
%o A306358 from itertools import count, islice
%o A306358 from math import prod
%o A306358 from sympy import factorint
%o A306358 def A306358_gen(startvalue=1): # generator of terms >= startvalue
%o A306358     for n in count(max(startvalue+1-(startvalue&1),1),2):
%o A306358         f = factorint(n)
%o A306358         if 1<int(not any(e&1 for e in f.values())) + (((m:=prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in f.items()))+((((~n & n-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1):
%o A306358             yield n
%o A306358 A306358_list = list(islice(A306358_gen(),30)) # _Chai Wah Wu_, Sep 09 2022
%K A306358 nonn
%O A306358 1,1
%A A306358 _Joerg Arndt_, Feb 10 2019