cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A001032 Numbers k such that sum of squares of k consecutive integers >= 1 is a square.

Original entry on oeis.org

1, 2, 11, 23, 24, 26, 33, 47, 49, 50, 59, 73, 74, 88, 96, 97, 107, 121, 122, 146, 169, 177, 184, 191, 193, 194, 218, 239, 241, 242, 249, 289, 297, 299, 311, 312, 313, 337, 338, 347, 352, 361, 362, 376, 383, 393, 407, 409, 431, 443, 457, 458, 479, 481, 491, 506
Offset: 1

Views

Author

Keywords

Comments

It was shown by Watson (and again by Ljunggren) that if 0^2 + 1^2 + ... + r^2 is a square then r = 0, 1 or 24.
The terms up to 1391 are == 0, 1, 2, 9, 11, 16, 23 (mod 24). Start number is in A007475(n). Square root of sum is in A076215(n). - Ralf Stephan, Nov 04 2002
The solutions in the case n=2 are in A001652 or A082291.
For k > 5 and k == 1 or 5 (mod 6), it appears that all k^2 are here. When n is not a square, the solution to problem 6552 shows that there are an infinite number of sums of n consecutive squares that equal a square. There are only a finite number when n is a square. For example, the only sum having 49 terms is 25^2 + ... + 73^2 = 357^2. - T. D. Noe, Jan 20 2011
In the previous comment, "it appears" can be removed because the k^2 squares beginning at (k^2+1)(k^2-25)/48 sum to a square. - Thomas Andrews, Feb 14 2011
See A180442 for the complementary problem of finding numbers n such that there are consecutive squares beginning with n^2 that sum to a square.
From Thomas Andrews, Feb 22 2011: (Start)
Elementary necessary conditions for n to be in this sequence:
1. If n=s^2b where b is squarefree, then:
a. If s is divisible by 3 then b is divisible by 3.
b. If s is divisible by 2, then b is divisible by 2.
c. If b is divisible by 3, then b = 6 (mod 9)
d. b only has prime factors p where 3 is a square, modulo p. (So, p=2, p=3, or p=12k+-1)
2.
a. If n+1 is divisible by 3, then (n+1)/3 is the sum of two perfect squares.
b. If n+1 is not divisible by 3, then n+1 is the sum of two perfect squares
The smallest number which satisfies these conditions which is not in this sequence is 842.
These conditions can be used to establish the conjecture of Ralf Stephan, above, that all the terms are == 0, 1, 2, 9, 11, 16, or 23 (mod 24). (End)
The numbers satisfying the above conditions but which are not in this sequence can be found in A274469. - Christopher E. Thompson, Jun 28 2016

Examples

			3^2 + 4^2 = 5^2, with two consecutive terms, so 2 is in the sequence.
Sum_{m=18..28} m^2 = 77^2, with eleven consecutive terms, so 11 is in the sequence and A007475(3) = 18. - _Bernard Schott_, Jan 03 2022
		

References

  • S. Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 6 of the Irish Mathematical Olympiad 1990 (in fact, it is 1991), page 96.
  • W. Ljunggren, New solution of a problem proposed by E. Lucas, Norsk Mat. Tid. 34 (1952), 65-72.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A097812 (n^2 is the sum of two or more consecutive squares).

Programs

  • Mathematica
    (* An empirical recomputation, assuming Ralf Stephan's conjecture *) nmax = 600; min[](* minimum start number *) = 1; max[](* maximum start number *) = 10^5; min[457(* the first not-so-easy term *)] = 10^7; min[577] = 10^5; min[587] = 10^7; max[457] = max[577] = max[587] = Infinity; okQ[n_ /; ! MemberQ[{0, 1, 2, 9, 11, 16, 23}, Mod[n, 24]]] = False; okQ[n_] := For[m = min[n], m < max[n], m++, If[IntegerQ[ r = Sqrt[1/6*n*(1 + 6*m^2 + 6*m*(n - 1) - 3*n + 2*n^2)]], Return[True]]]; nmr = Reap[k = 1; Do[If[okQ[n] === True, Print["a(", k, ") = ", n, ", start nb = A007475(", k, ") = ", m, ", sqrt(sum) = A076215(", k, ") = ", r]; k++; Sow[{n, m, r}]], {n, 1, nmax}]][[2, 1]]; A001032 = nmr[[All, 1]]; A007475 = nmr[[All, 2]]; A076215 = nmr[[All, 3]] (* Jean-François Alcover, Sep 09 2013 *)
  • PARI
    is(n,L=max(999,n^5\2e5),s=norml2([1..n-1]))={bittest(8456711,n%24) && for(x=n,L,issquare(s+=(2*x-n)*n)&&return(x))} \\ Returns the smallest "ending number" x (such that (x-n+1)^2+...+x^2 is a square) if n is in the sequence, otherwise zero. - M. F. Hasler, Feb 02 2016

Extensions

Corrected by T. D. Noe, Aug 25 2004
Offset changed to 1 by N. J. A. Sloane, Jun 2008
Additional terms up to 30000 added to b-file by Christopher E. Thompson, Jun 10 2016
Additional terms up to 250000 added to b-file by Christopher E. Thompson, Feb 20 2018

A007475 a(n) is the smallest positive number such that the sum of A001032(n) consecutive squares starting with a(n)^2 is a square.

Original entry on oeis.org

1, 3, 18, 7, 1, 25, 7, 539, 25, 7, 22, 442, 225, 192, 13, 15, 26914, 244, 50, 5552, 30, 553, 7, 4493, 83342, 83, 65, 775, 3807, 64, 556, 20, 106, 132, 2277, 15, 1788, 5063, 27, 11320, 280, 358, 1805, 210, 9985, 802, 183, 71752, 10123, 16806, 94707486, 1081
Offset: 1

Views

Author

Keywords

Examples

			a(3)=18 because A001032(3)=11 and the sum of 11 squares 18^2 + 19^2 + ... + 28^2 = 77^2.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001032.
Square roots of sum are in A076215.

Extensions

Better description and more terms from Ralf Stephan, Nov 03 2002
Corrected by T. D. Noe, Aug 25 2004
Offset corrected to 1 by M. F. Hasler, Feb 02 2016

A350886 Let X,Y,Z be positive integer solutions to X^2 = Sum_{j=0..Y-1} (1+Z*j)^2, where solutions for Y or Z < 1 are excluded. This sequence lists the sorted values for X.

Original entry on oeis.org

54, 70, 1618, 2344, 2541, 27597, 48486, 73795, 184162, 320739, 648009, 766669, 990983, 1452962, 3816551, 4456264, 6287116, 23251921, 37396339, 43540374, 51136014, 53005618, 63668661, 147115419, 205943541, 236317895, 253970684, 275914803, 386480829, 629467300
Offset: 1

Views

Author

Thomas Scheuerle, Feb 25 2022

Keywords

Comments

A generalization of the cannonball problem for pyramids with a slope of 1/A350888(n). In the cannonball problem, a square pyramid of stacked balls shall contain a square number of balls in total. Each layer of such a pyramid consists of a square number of balls, in the classic case the top layer has one ball, the layers below contain adjacent square numbers of balls. For this sequence we ignore the fact that if adjacent layers do not alternate between odd and even squares the stacking will become difficult at least for sphere-like objects. We start in the top layer always with one ball, but will skip a constant count of square numbers between each layer. This results in pyramids which slope <= 1.
a(n) may be interpreted as the length of a Pythagorean vector with gcd = 1 (over all coordinates) and no duplicate coordinate values. Such vectors may have applications in the theory of lattices.

Examples

			a(1) = 54 and A350887(1) = 4, A350888(1) = 14:
   54^2 = 1^2 + 15^2 + 29^2 + 43^2.
a(2) = 70 and  A350887(2) = 24, A350888(2) = 1:
   70^2 = 1^2 + 2^2 + 3^2 + ... + 23^2 + 24^2. This is the classic solution for the cannonball problem.
		

Crossrefs

Cf. A350887 (number of layers), A350888 (denominator of slope).
Cf. A000330, A000447, A024215, A024381 (square pyramidal numbers for slope 1, 1/2, 1/3, 1/4).
Cf. A076215, A001032, A134419, A106521. Some related problems.

Programs

  • PARI
    sqtest(n,c)={q=1; for(t=2, c, t+=n; q+=(t*t); if(issquare(q), break)); q}
    z=500000; a=[];for(n=0,z,r=sqtest(n,z); if(issquare(r), a=concat(a, sqrtint(r)))); a=vecsort(a) \\ Last valid value for z=500000 is 990983.

Formula

a(n)^2 = A350888(n)^2*binomial(2*A350887(n), 3)/4 + 2*A350888(n)*binomial(A350887(n), 2) + A350887(n).
a(n)^2 = c*((b*(4*b*c^2-(6*c-2)*b + 12*(c-1)) + 12)/12), with c = A350887(n) and b = A350888(n). Expanded to see factors more clearly.
a(n)^2 = c*b^2*( ((1/b) + (c-1)/2)^2 + (c^2-1)/12 ). Shorter form of above.
(12*a(n)^2) mod A350887(n) = 0.
((12*a(n)^2/A350887(n)) - 12) mod A350888(n) = 0.
Choose n such that A350887(n) = 4 and a(n) = 54 and A350888(n) = 14, then we may find further solutions recursively for all A350887(m) = 4 with
x = -A350888(n) = -14; y = -a(n) = -54 and also x = A350888(n) = 14; y = a(n) = 54. Recursive solutions:
x_(n+1) = 15*x_n + 4*y_n + 6
y_(n+1) = 56*x_n + 15*y_n + 24 and also:
x_(n+1) = 15*x_n - 4*y_n + 6
y_(n+1) = -56*x_n + 15*y_n - 24.
Choose n such that A350887(n) = 9 and a(n) = 27597 and A350888(n) = 1932, then we may find further solutions recursively for all A350887(m) = 9 with x = -A350888(n) = -1932; y = -a(n) = -27597 and also x = A350888(n) = 1932; y = a(n) = 27597. Recursive solutions:
x_(n+1) = 4999*x_n + 350*y_n + 882
y_(n+1) = 71400*x_n + 4999*y_n + 12600 and also:
x_(n+1) = 4999*x_n - 350*y_n + 6
y_(n+1) = -71400*x_n + 4999*y_n - 12600.
Further recursive solution formulas for other values of A350887(n) will be provided in a link as for some values the coefficients become very large sometimes with several hundred digits.
a(n) != a(m) if n != m.

A350887 Let X,Y,Z be positive integer solutions to X^2 = Sum_{j=0..Y-1} (1+Z*j)^2, where solutions for Y or Z < 1 are excluded. This sequence lists the values for Y sorted by X.

Original entry on oeis.org

4, 24, 4, 64, 49, 9, 4, 50, 484, 3249, 81, 361, 49, 4, 289, 64, 16, 3938, 5041, 4, 36, 568, 441, 121, 4761, 33, 1936, 9, 49, 25872, 4, 64, 8257, 24, 361, 12024
Offset: 1

Views

Author

Thomas Scheuerle, Feb 25 2022

Keywords

Comments

A generalization of the cannonball problem for pyramids with a slope of 1/A350888(n). In the cannonball problem, a square pyramid of stacked balls shall contain a square number of balls in total. Each layer of such a pyramid consists of a square number of balls, in the classic case the top layer has one ball, the layers below contain adjacent square numbers of balls. For this sequence we ignore the fact that if adjacent layers do not alternate between odd and even squares the stacking will become difficult at least for sphere-like objects. We start in the top layer always with one ball, but will skip a constant count of square numbers between each layer. This results in pyramids which slope <= 1. a(n) is the number of layers needed to stack such a pyramid. As this sequence is only a list of solutions, n has no known relation to its definition.
This sequence contains only numbers which appear in A186699, too. A number which is in A186699, does not appear in this sequence if it is of the form: 2^m*p where p is a prime of the form 12*k+1 or 12*k-1. There are also some perfect squares like 25 excluded, as these would only provide valid solutions in the case of A350888(n) = 0, which is not part of the sequence definition.

Examples

			a(1) = 4 and A350886(1) = 54, A350888(1) = 14: 54^2 = 1^2 + 15^2 + 29^2 + 43^2.
a(2) = 24 and A350886(2) = 70, A350888(2) = 1: 70^2 = 1^2 + 2^2 + 3^2 + ... + 23^2 + 24^2. This is the classic solution for the cannonball problem.
		

Crossrefs

Cf. A350886 (squareroot of pyramid), A350888 (denominator of slope).
Cf. A000330, A000447, A024215, A024381 (square pyramidal numbers for slope 1, 1/2, 1/3, 1/4).
Cf. A076215, A001032, A134419, A106521. Some related problems.
Cf. A186699.

Programs

  • PARI
    sqtest(n, c)={q=1; r=1; for(t=2, c, t+=n; r+=1; q+=(t*t); if(issquare(q), break)); [q, r]}
    z=500000; b=[;]; for(n=0,z,r=sqtest(n,z); if(issquare(r[1]), b=concat(b,[sqrtint(r[1]); r[2]]))); b=vecsort(b,1); vector(#b, k, b[2, k]) \\ Last valid value for z=500000 is 49.

Formula

A350886(n)^2 = A350888(n)^2*binomial(2*a(n), 3)/4 + 2*A350888(n)*binomial(a(n), 2) + a(n).
A350886(n)^2 = c*((b*(4*b*c^2-(6*c-2)*b + 12*(c-1)) + 12)/12), with c = a(n) and b = A350888(n). Expanded to see factors more clearly.
A350886(n)^2 = c*b^2*( ((1/b) + (c-1)/2)^2 + (c^2-1)/12 ). Shorter form of above.

A350888 Let X,Y,Z be positive integer solutions to X^2 = Sum_{j=0..Y-1} (1+Z*j)^2, where solutions for Y or Z < 1 are excluded. This sequence lists the values for Z sorted by X.

Original entry on oeis.org

14, 1, 432, 8, 13, 1932, 12958, 367, 30, 3, 1554, 194, 5082, 388320, 1349, 15254, 178542, 163, 181, 11636654, 418782, 6791, 11928, 192638, 1086, 2209447, 5166, 19317900, 1981979, 262, 348711312, 4799102, 7379, 60240793
Offset: 1

Views

Author

Thomas Scheuerle, Feb 25 2022

Keywords

Comments

This is a generalization of the cannonball problem for pyramids with a slope of 1/a(n). In the cannonball problem, a square pyramid of stacked balls shall contain a square number of balls in total. Each layer of such a pyramid consists of a square number of balls, in the classic case the top layer has one ball, the layers below contain adjacent square numbers of balls. For this sequence we ignore the fact that if adjacent layers do not alternate between odd and even squares the stacking will become difficult at least for sphere-like objects. We start in the top layer always with one ball, but will skip a constant count of square numbers between each layer. This results in pyramids which slope <= 1. A350887(n) is the number of layers needed to stack such a pyramid. As this sequence is only a list of solutions, n has no known relation to its definition.
For each slope 1/a(n) there exists exactly one or no such pyramid with a square number of balls.

Examples

			a(1) = 14 and A350886(1) = 54, A350887(1) = 4:
  54^2 = 1^2 + 15^2 + 29^2 + 43^2.
a(2) = 1 and A350886(2) = 70, A350887(2) = 24:
  70^2 = 1^2 + 2^2 + 3^2 + ... + 23^2 + 24^2. This is the classic solution for the cannonball problem.
		

Crossrefs

Cf. A350886 (square root of pyramid), A350887 (number of layers).
Cf. A000330, A000447, A024215, A024381 (square pyramidal numbers for slope 1, 1/2, 1/3, 1/4).
Cf. A076215, A001032, A134419, A106521. Some related problems.
Cf. A186699.

Programs

  • PARI
    sqtest(n, c)={q=1; for(t=2, c, t+=n; q+=(t*t); if(issquare(q), break)); q}
    z=500000; b=[; ]; for(n=0, z, r=sqtest(n, z); if(issquare(r), b=concat(b, [sqrtint(r); n+1]))); b=vecsort(b, 1); vector(#b, k, b[2,k]) \\ Last valid value for z=500000 is 5082.

Formula

A350886(n)^2 = a(n)^2*binomial(2*A350887(n), 3)/4 + 2*a(n)*binomial(A350887(n), 2) + A350887(n).
A350886(n)^2 = c*((b*(4*b*c^2-(6*c-2)*b + 12*(c-1)) + 12)/12), with c = A350887(n) and b = a(n). Expanded to see factors more clearly.
A350886(n)^2 = c*b^2*( ((1/b) + (c-1)/2)^2 + (c^2-1)/12 ). Shorter form of above.
a(n) != a(m) if n != m.
Let s(n) be the sequence of numbers such that A350887(s(n)) = 4 and s(n) is sorted in ascending order, then a(s(n)) has the ordinary generating function (2*(-7 + z))/(-1 + 31*z - 31*z^2 + z^3).
Let s(n) be the sequence of numbers such that A350887(s(n)) = 49 and s(n) is sorted in ascending order, then a(s(n)) has the ordinary generating function (-13 + z)/(-1 + 391*z - 391*z^2 + z^3).
Showing 1-5 of 5 results.