login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A025426 Number of partitions of n into 2 nonzero squares. 41

%I

%S 0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,1,0,1,0,0,0,0,1,1,0,0,1,0,0,1,0,

%T 1,0,0,1,0,0,1,1,0,0,0,1,0,0,0,0,2,0,1,1,0,0,0,0,1,0,0,1,0,0,0,2,0,0,

%U 1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,0,2,0,0,0,1,1,0,0,0,0,0,0,1,1,0,1,1,0,0,1,0,1,0

%N Number of partitions of n into 2 nonzero squares.

%C For records see A007511, A048610, A016032. - _R. J. Mathar_, Feb 26 2008

%H R. Zumkeller, <a href="/A025426/b025426.txt">Table of n, a(n) for n = 0..10000</a>

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

%F Let m = A004018(n)/4. If m is even then a(n) = m/2, otherwise a(n) = (m - (-1)^A007814(n))/2. - _Max Alekseyev_, Mar 09 2009, Mar 14 2009

%F a(A018825(n)) = 0; a(A000404(n)) > 0; a(A025284(n)) = 1; a(A007692(n)) > 1. - _Reinhard Zumkeller_, Aug 16 2011

%F a(A000578(n)) = A084888(n). - _Reinhard Zumkeller_, Jul 18 2012

%F a(n) = Sum_{i=1..floor(n/2)} A010052(i) * A010052(n-i). - _Wesley Ivan Hurt_, Apr 19 2019

%F a(n) = [x^n y^2] Product_{k>=1} 1/(1 - y*x^(k^2)). - _Ilya Gutkovskiy_, Apr 19 2019

%p A025426 := proc(n)

%p local a,x;

%p a := 0 ;

%p for x from 1 do

%p if 2*x^2 > n then

%p return a;

%p end if;

%p if issqr(n-x^2) then

%p a := a+1 ;

%p end if;

%p end do:

%p end proc: # _R. J. Mathar_, Sep 15 2015

%t m[n_] := m[n] = SquaresR[2, n]/4; a[0] = 0; a[n_] := If[ EvenQ[ m[n] ], m[n]/2, (m[n] - (-1)^IntegerExponent[n, 2])/2]; Table[ a[n], {n, 0, 107}] (* _Jean-Fran├žois Alcover_, Jan 31 2012, after _Max Alekseyev_ *)

%o (Haskell)

%o a025426 n = sum $ map (a010052 . (n -)) $

%o takeWhile (<= n `div` 2) $ tail a000290_list

%o a025426_list = map a025426 [0..]

%o -- _Reinhard Zumkeller_, Aug 16 2011

%o (PARI) a(n)=my(v=valuation(n,2),f=factor(n>>v),t=1);for(i=1,#f[,1],if(f[i,1]%4==1,t*=f[i,2]+1,if(f[i,2]%2,return(0))));if(t%2,t-(-1)^v,t)/2 \\ _Charles R Greathouse IV_, Jan 31 2012

%Y Cf. A000161 (2 nonnegative squares), A063725 (order matters), A025427 (3 nonzero squares).

%Y Cf. A172151, A004526. - _Reinhard Zumkeller_, Jan 26 2010

%Y Column k=2 of A243148.

%K nonn,easy

%O 0,51

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 16 11:12 EDT 2019. Contains 324152 sequences. (Running on oeis4.)