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-7 of 7 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

A174069 Numbers that can be written as a sum of at least 2 squares of consecutive positive integers.

Original entry on oeis.org

5, 13, 14, 25, 29, 30, 41, 50, 54, 55, 61, 77, 85, 86, 90, 91, 110, 113, 126, 135, 139, 140, 145, 149, 174, 181, 190, 194, 199, 203, 204, 221, 230, 245, 255, 265, 271, 280, 284, 285, 294, 302, 313, 330, 355, 365, 366, 371, 380, 384, 385, 415, 421, 434, 446, 451
Offset: 1

Views

Author

Keywords

Comments

Numbers are listed without multiplicity: 365 is the first term that is the sum of two or more squares in more than one way. See A062681 for other numbers of that form. - M. F. Hasler, Dec 22 2013
A subsequence of A212016. This sequence focuses on the squares of consecutive positive integers. - Altug Alkan, Dec 24 2015

Examples

			5 = 1^2 + 2^2
13 = 2^2 + 3^2
14 = 1^2 + 2^2 + 3^2
25 = 3^2 + 4^2
		

Crossrefs

Cf. A111774, A138591, A151557 (subset of squares), A163251 (subset of primes).
See also A062681, A212016.

Programs

  • Mathematica
    max = 50^2; lst = {}; Do[z = n^2; Do[z += (n + x)^2; If[z > max, Break[]]; AppendTo[lst, z], {x, max/2}], {n, max/2}]; Union[lst]
  • PARI
    N=20;a=[];for(i=2,N, for(k=1,i-1,if(N^2*2>t=sum(j=i-k,i,j^2),a=setunion(a,Set(t)),break)));a \\ M. F. Hasler, Dec 22 2013

Extensions

Name edited by Altug Alkan, Dec 24 2015

A097812 Numbers n such that n^2 is the sum of two or more consecutive positive squares.

Original entry on oeis.org

5, 29, 70, 77, 92, 106, 138, 143, 158, 169, 182, 195, 245, 253, 274, 357, 385, 413, 430, 440, 495, 531, 650, 652, 655, 679, 724, 788, 795, 985, 1012, 1022, 1055, 1133, 1281, 1365, 1397, 1518, 1525, 1529, 1546, 1599, 1612, 1786, 1828, 2205, 2222, 2257, 2372
Offset: 1

Views

Author

T. D. Noe, Aug 25 2004

Keywords

Comments

These numbers were found by exhaustive search. The sums are not unique; for n = 143, there are two representations. The Mathematica code prints n, the range of squares in the sum and the number of squares in the sum. Because the search included sums of all squares up to 2000, this sequence is complete up to 2828.

Examples

			29 is in this sequence because 20^2 + 21^2 = 29^2.
Contribution from _Donovan Johnson_, Feb 19 2011: (Start)
For seven terms < (10^15)^(1/2), the square is a sum in two different ways:
143^2 = 7^2 + ... + 39^2 = 38^2 + ... + 48^2.
2849^2 = 294^2 + ... + 367^2 = 854^2 + ... + 864^2.
208395^2 = 2175^2 + ... + 5199^2 = 29447^2 + ... + 29496^2.
2259257^2 = 9401^2 + ... + 25273^2 = 26181^2 + ... + 32158^2.
6555549^2 = 41794^2 + ... + 58667^2 = 87466^2 + ... + 92756^2.
11818136^2 = 10898^2 + ... + 74906^2 = 29929^2 + ... + 76392^2.
19751043^2 = 39301^2 + ... + 107173^2 = 249217^2 + ... + 255345^2. (End)
		

Crossrefs

Cf. A097811 (n^3 is the sum of consecutive cubes).

Programs

  • Mathematica
    g[m0_, m1_] := (1 - m0 + m1)(-m0 + 2m0^2 + m1 + 2m0 m1 + 2m1^2)/6; A097812 = {}; Do[n = g[m0, m1]^(1/2); If[IntegerQ[n], Print[{n, m0, m1, m1 - m0 + 1}]; AppendTo[A097812, n]], {m1, 2, 2000}, {m0, m1 - 1, 1, -1}]; Union[A097812]

Extensions

Name edited by Altug Alkan, Dec 07 2015

A180259 Squares which are the sum of consecutive squares starting with 25^2.

Original entry on oeis.org

625, 33124, 38025, 127449, 64529089, 81180100, 15884821225, 3370675683600
Offset: 1

Views

Author

Zhining Yang, Jan 17 2011

Keywords

Comments

That is, terms are squares of the form sum_{i=25..m} i^2 = (m-24) *(2*m^2+51*m+1225) / 6 for some m. Known solutions refer to m = 25, 48, 50, 73, 578, 624, 3625 and 21624, and no further in the range m <= 70000000.
This sequence is complete. See A180442 and A184763.

Examples

			38025 is in the sequence because 38025 = 195^2 = 25^2 + 26^2 + ... + 50^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[25, 22000]^2], IntegerQ[Sqrt[#]] &] (* Harvey P. Dale, Aug 10 2023 *)
  • PARI
    for(n=26,9999999,t=n*(n+1)*(2*n+1)/6-4900;if(issquare(t),print1(t,",")))

A180273 Squares which are a sum of consecutive squares starting with 7^2.

Original entry on oeis.org

49, 8464, 20449, 60025, 2304324, 3624882849
Offset: 1

Views

Author

Zhining Yang, Jan 17 2011

Keywords

Comments

That is, terms are squares of the form sum_{i=7..m} i^2 for some m. This sequence is complete. See A180442 and A184763.

Examples

			a(2) = 8464 = 92^2 = 7^2+8^2+9^2+...+28^2+29^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Accumulate[Range[7,3000]^2],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Jul 16 2014 *)
  • PARI
    for(n=8,9999999,t=n*(n+1)*(2*n+1)/6-91;if(issquare(t),print1(t,",")))

A307608 Number of partitions of n^2 into consecutive positive squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 18 2019

Keywords

Examples

			29^2 = 20^2 + 21^2, so a(29) = 2.
		

Crossrefs

Formula

a(n) = [x^(n^2)] Sum_{i>=1} Sum_{j>=i} Product_{k=i..j} x^(k^2).
a(n) = A296338(A000290(n)).
a(n) >= 2 for n in A097812.

A180465 Squares which are a sum of consecutive squares starting with 38^2.

Original entry on oeis.org

1444, 20449, 281961, 14212900, 107827456, 564343507984
Offset: 1

Views

Author

Zhining Yang, Jan 19 2011

Keywords

Comments

This sequence is complete. See A180442 and A184763.

Crossrefs

Programs

  • PARI
    for(n=38, 9999999, t=n*(n+1)*(2*n+1)/6-17575; if(issquare(t), print1(t, ", ")))
Showing 1-7 of 7 results.