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.

A025284 Numbers that are the sum of 2 nonzero squares in exactly 1 way.

This page as a plain text file.
%I A025284 #33 Feb 16 2025 08:32:35
%S A025284 2,5,8,10,13,17,18,20,25,26,29,32,34,37,40,41,45,52,53,58,61,68,72,73,
%T A025284 74,80,82,89,90,97,98,100,101,104,106,109,113,116,117,122,128,136,137,
%U A025284 146,148,149,153,157,160,162,164,169,173,178,180,181,193,194,197,202,208,212
%N A025284 Numbers that are the sum of 2 nonzero squares in exactly 1 way.
%C A025284 A025426(a(n)) = 1. - _Reinhard Zumkeller_, Aug 16 2011
%H A025284 Reinhard Zumkeller, <a href="/A025284/b025284.txt">Table of n, a(n) for n = 1..10000</a>
%H A025284 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquareNumber.html">Square Number</a>
%H A025284 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~twosquares.en.html">Two squares</a>
%H A025284 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A025284 A243148(a(n),2) = 1. - _Alois P. Heinz_, Feb 25 2019
%t A025284 selQ[n_] := Length[ Select[ PowersRepresentations[n, 2, 2], Times @@ # != 0 &]] == 1; Select[Range[300], selQ] (* _Jean-François Alcover_, Oct 03 2013 *)
%t A025284 b[n_, i_, k_, t_] := b[n, i, k, t] = If[n == 0, If[t == 0, 1, 0], If[i<1 || t<1, 0, b[n, i - 1, k, t] + If[i^2 > n, 0, b[n - i^2, i, k, t - 1]]]];
%t A025284 T[n_, k_] := b[n, Sqrt[n] // Floor, k, k];
%t A025284 Position[Table[T[n, 2], {n, 0, 300}], 1] - 1 // Flatten (* _Jean-François Alcover_, Nov 06 2020, after _Alois P. Heinz_ in A243148 *)
%o A025284 (Haskell)
%o A025284 import Data.List (elemIndices)
%o A025284 a025284 n = a025284_list !! (n-1)
%o A025284 a025284_list = elemIndices 1 a025426_list
%o A025284 -- _Reinhard Zumkeller_, Aug 16 2011
%Y A025284 Cf. A000404, A025426, A081324, A125022, A018825, A001481, A007692, A243148.
%K A025284 nonn
%O A025284 1,1
%A A025284 _David W. Wilson_