login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338939 a(n) is the number of partitions n = a + b such that a*b is a perfect square. 2
0, 1, 0, 1, 1, 1, 0, 1, 0, 3, 0, 1, 1, 1, 1, 1, 1, 1, 0, 3, 0, 1, 0, 1, 2, 3, 0, 1, 1, 3, 0, 1, 0, 3, 1, 1, 1, 1, 1, 3, 1, 1, 0, 1, 1, 1, 0, 1, 0, 5, 1, 3, 1, 1, 1, 1, 0, 3, 0, 3, 1, 1, 0, 1, 4, 1, 0, 3, 0, 3, 0, 1, 1, 3, 2, 1, 0, 3, 0, 3, 0, 3, 0, 1, 4, 1, 1, 1, 1, 3, 1, 1, 0, 1, 1, 1, 1, 1, 0, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,10

COMMENTS

Number of ways to regroup the unit squares of a rectangle with semiperimeter n into a square.

a(n) > 0 for n in A337140.

LINKS

David A. Corneth, Table of n, a(n) for n = 1..10000

FORMULA

Let n = 2^ t * p_1^a_1 * p_2^a_2 *...* p_r^a_r * q_1^b_1 * q_2^b_2 *...* q_s^b_s   with t >= 0, a_i >= 0 for i = 1... r, where p_i = 1 mod 4 and q_j = -1 mod 4 for j = 1.. s. Let further A = (2a_1 + 1)*(2a_2 + 1) *... *(2a_r + 1). Then a(n) = ( A - 1 ) / 2 for n is odd and a(n) = A for n is even.

a(n) = A338940(n) / A115878(n).

EXAMPLE

n = 10 = 1 + 9 = 2 + 8 = 5 + 5 with 1*9 = 3^2 and 2*8 = 4^2 and 5*5 = 5^2. Then a(10) = 3. Also 10 = 2^1 * 5^1. So t=1, a_1=1 and a(n) = A = 2*1+1 = 3

MATHEMATICA

a[n_] := Count[IntegerPartitions[n, {2}], _?(IntegerQ @ Sqrt[Times @@ #] &)]; Array[a, 100] (* Amiram Eldar, Nov 22 2020 *)

PROG

(PARI) a(n)=my(c=0); for(i=1, n-1, if((2*i<=n)&&issquare(i*(n-i)), c++)); c

for(n=1, 100, print1(a(n), ", ")) \\ Derek Orr, Nov 18 2020

(PARI) a(n) = sum(i=1, n-1, (2*i<=n) && issquare(i*(n-i))); \\ Michel Marcus, Dec 21 2020

(PARI) first(n) = {my(res = vector(n)); for(i = 1, n, d = divisors(i^2); for(i = (#d + 1)\2, #d, c = d[i] + d[#d + 1 - i]; if(c <= n, res[c]++ , next(2) ) ) ); res } \\ David A. Corneth, Dec 21 2020

CROSSREFS

Cf. A115878, A337140, A338940.

Sequence in context: A343858 A065714 A110700 * A292150 A181875 A051908

Adjacent sequences:  A338936 A338937 A338938 * A338940 A338941 A338942

KEYWORD

nonn

AUTHOR

Hein van Winkel, Nov 16 2020

STATUS

approved

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 September 16 07:19 EDT 2021. Contains 347469 sequences. (Running on oeis4.)