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!)
A183928 Number of nondecreasing arrangements of n numbers in -2..2 with sum zero and sum of squares less than 2n. 1
1, 2, 2, 5, 8, 10, 15, 21, 26, 35, 44, 53, 67, 81, 94, 114, 134, 153, 179, 206, 232, 266, 300, 334, 377, 420, 462, 515, 568, 620, 683, 747, 810, 885, 960, 1035, 1123, 1211, 1298, 1400, 1502, 1603, 1719, 1836, 1952, 2084, 2216, 2348, 2497, 2646, 2794, 2961, 3128 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Column 2 of A183935.

From David A. Corneth, Oct 21 2017: (Start)

Let x_i be the number of numbers in such an arrangement with |i| = 2. Then x_1 + 4*x_2 < 2*n and x_1 is even, x_1 + x_2 != 1.

A pair (x_1, x_2) has a fixed number of arrangements corresponding to it, independent of the number of zeros in the arrangement, hence independent of n. For example, for (x_1, x_2) = (2, 1), we could find the arrangements (-1, -1, 2) and (-2, 1, 1) and from there on find some solutions counted in n = 4 (see example below) by putting an extra 0 to each arrangement to find (-1, -1, 0, 2) and (-2, 0, 1, 1).

For some n, we might find that (x_1, x_2) is feasible by the restrictions above. If all those 1's and 2's are signed positive, their sums become S = x_1 + 2 * x_2. We then change signs of 1's and 2's such that the sum of all terms is 0. If we change the sign of 1 from + to -, the total is reduced by 2 * 1 = 2. Similarily, if we change the sign of 2 from + to -, we reduce the total by 2*2 = 4. Let s_i be the number of i's whose signs we change from + to -, x_i - s_i, s_i >= 0. So the sum S must be even. We get the new sum 0 = (x_1 - 2*s_1) + (2 * x_2 - 2*s_2) = x_1 + 2 * x_2 - 2 * (s_1 + s_2) = S - 2 * (s_1 + s_2). I.e., s_1 + s_2 = S/2, which is a Diophantine equation. Note that the solution to this equation can be used for computation of various values of a(n). See the example for an application.

(End)

LINKS

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

FORMULA

Empirical: a(n) = a(n-1)+2*a(n-3)-a(n-4)-a(n-5)-a(n-6)-a(n-7)+2*a(n-8)+a(n-10)-a(n-11).

Empirical g.f.: x*(1 + x + x^3 + x^5) / ((1 - x)^4*(1 + x)*(1 + x^2)*(1 + x + x^2)^2). - Colin Barker, Oct 21 2017

EXAMPLE

All solutions for n=4:

  -1      0     -2     -1     -1

   0      0      0     -1     -1

   0      0      1      0      1

   1      0      1      2      1

Suppose we try to find a(6) and see that (0, 0, 1, 1, 2, 2) has sum of squares <= 2*6 = 12. This corresponds to x_1 = x_2 = 2 and gives S = x_1 + 2*x_2 = 2 + 2*2 = 6. We change signs so that s_1 + 2*s_2 = S/2 = 6/2 = 3, with s_1, s_2 in {0, 1, 2}. We see that (s_1, s_2) in {(1, 1)} so the only solution for this is (0, 0, -1, 1, -2, 2) which is (-2, -1, 0, 0, 1, 2) when sorted. - David A. Corneth, Oct 24 2017

PROG

(PARI) a(n) = {my(res = 0); for(x_2 = 0, (2*n - 1) \ 4, forstep(x_1 = 0, min(2*n - 4 * x_2 - 1, n), 2, if(x_1 + x_2 != 1 && x_1 + x_2 <= n && !(x_1 == 0 && x_2%2 == 1), res += (2 * (min((x_1 - 2*(x_2%2))\4, x_2\2) + 1) - !(x_2%2))))); res} \\ David A. Corneth, Oct 24 2017

CROSSREFS

Cf. A183935.

Sequence in context: A284325 A035570 A286559 * A333191 A329739 A126291

Adjacent sequences:  A183925 A183926 A183927 * A183929 A183930 A183931

KEYWORD

nonn

AUTHOR

R. H. Hardin, Jan 08 2011

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 June 15 13:25 EDT 2021. Contains 345048 sequences. (Running on oeis4.)