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!)
A083023 a(n) = number of partitions of n into a pair of parts n=p+q, p>=q>=0, with p-q equal to a square >= 0. 1

%I #14 Nov 27 2019 02:36:58

%S 1,1,1,2,1,2,1,2,2,2,2,2,2,2,2,3,2,3,2,3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,

%T 3,4,3,4,3,4,3,4,3,4,3,4,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,4,5,4,5,

%U 4,5,4,5,4,5,4,5,4,5,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,6

%N a(n) = number of partitions of n into a pair of parts n=p+q, p>=q>=0, with p-q equal to a square >= 0.

%C Number of integers k, 0 <= k <= n/2 such that n - 2k is a square.

%F See Maple line.

%e a(11) = 2: the partitions are (1,10) and (5,6).

%p f := n->if n mod 2 = 0 then floor(sqrt((n-2)/4))+1 else floor(sqrt((n-2)/4)-1/2)+1; fi; # then add 1 if n is a square!

%o (PARI)

%o a(n)={my(ct=0,d=0); while(d^2<=n, if((n-d^2)%2==0, ct+=1); d+=1 ); return(ct); }

%o /* _Joerg Arndt_, Oct 08 2012 */

%Y See A084359 for another version.

%K nonn,easy

%O 1,4

%A Anne M. Donovan (anned3005(AT)aol.com), May 31 2003

%E More terms from _Michel ten Voorde_, Jun 13 2003

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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)