The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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
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. Further, let A = (2a_1 + 1)*(2a_2 + 1)*...*(2a_r + 1). Then a(n) = (A-1)/2 for odd n and a(n) = A for even n.
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
Sequence in context: A343858 A065714 A110700 * A292150 A181875 A051908
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 00:14 EDT 2024. Contains 373227 sequences. (Running on oeis4.)