login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025284 Numbers that are the sum of 2 nonzero squares in exactly 1 way. 18

%I #32 Nov 06 2020 08:37:19

%S 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 74,80,82,89,90,97,98,100,101,104,106,109,113,116,117,122,128,136,137,

%U 146,148,149,153,157,160,162,164,169,173,178,180,181,193,194,197,202,208,212

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

%C A025426(a(n)) = 1. - _Reinhard Zumkeller_, Aug 16 2011

%H Reinhard Zumkeller, <a href="/A025284/b025284.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SquareNumber.html">Square Number</a>

%H G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~twosquares.en.html">Two squares</a>

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%F A243148(a(n),2) = 1. - _Alois P. Heinz_, Feb 25 2019

%t selQ[n_] := Length[ Select[ PowersRepresentations[n, 2, 2], Times @@ # != 0 &]] == 1; Select[Range[300], selQ] (* _Jean-François Alcover_, Oct 03 2013 *)

%t 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 T[n_, k_] := b[n, Sqrt[n] // Floor, k, k];

%t 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 (Haskell)

%o import Data.List (elemIndices)

%o a025284 n = a025284_list !! (n-1)

%o a025284_list = elemIndices 1 a025426_list

%o -- _Reinhard Zumkeller_, Aug 16 2011

%Y Cf. A000404, A025426, A081324, A125022, A018825, A001481, A007692, A243148.

%K nonn

%O 1,1

%A _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 01:26 EDT 2024. Contains 372341 sequences. (Running on oeis4.)