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

A151557 Squares which are the sum of two or more consecutive squares.

Original entry on oeis.org

25, 841, 4900, 5929, 8464, 11236, 19044, 20449, 24964, 28561, 33124, 38025, 60025, 64009, 75076, 127449, 148225, 170569, 184900, 193600, 245025, 281961, 422500, 425104, 429025, 461041, 524176, 620944, 632025, 970225, 1024144, 1044484, 1113025, 1283689
Offset: 1

Views

Author

N. J. A. Sloane, May 21 2009

Keywords

Examples

			25 = 5^2 = 3^2 + 4^2
841 = 29^2 = 20^2 + 21^2
4900 is the sum of the first 24 squares.
		

Crossrefs

Cf. A001032. Superset is A174069.

Programs

Formula

a(n) = A097812(n)^2.

A111044 Integers which can be written as a sum of at least 2 consecutive squares in at least 3 different ways.

Original entry on oeis.org

147441, 910805, 1026745, 2403800, 2513434, 3198550, 11739805, 15053585, 18646301, 33313175, 93812510, 102939515, 134910295, 136448235, 151443110, 163998695, 195435485, 197780465, 213872920, 267043455, 461498779, 482204660, 554503705, 559990541, 601704095
Offset: 1

Views

Author

Sébastien Dumortier, Oct 06 2005

Keywords

Comments

The smallest number which can be expressed in 4 such ways is 554503705, which is equal to the sum of squares of the integers in the closed intervals (480,1210), (3570,3612), (3613,3654) and (7442,7451). - Giovanni Resta, Jul 25 2007

Examples

			147441 = 85^2 + 86^2 + ... + 101^2 = 29^2 + 30^2 + ... + 77^2 = 18^2 + 19^2 + ... + 76^2;
910805 = 550^2 + 551^2 + 552^2 = 144^2 + 145^2 + ... + 178^2 = 35^2 + 36^2 + ... + 140^2;
1026745 = 716^2 + 717^2 = 51^2 + 52^2 + ... + 147^2 = 1^2 + 2^2 + ... + 145^2;
2403800 = 583^2 + 584^2 + ... + 589^2 = 368^2 + 369^2 + ... + 384^2 = 298^2 + 299^2 + ... + 322^2;
2513434 = 473^2 + 474^2 + ... + 483^2 = 286^2 + 287^2 + ... + 313^2 = 66^2 + 67^2 + ... + 198^2;
3198550 = 225^2 + 226^2 + ... + 275^2 = 127^2 + 128^2 + ... + 226^2 = 1^2 + 2^2 + ... + 212^2.
		

Crossrefs

Extensions

More terms from Giovanni Resta, Jul 25 2007

A097811 Numbers n such that n^3 is the sum of three or more consecutive positive cubes.

Original entry on oeis.org

6, 20, 40, 60, 70, 180, 330, 540, 1155, 1581, 2805, 2856, 3876, 5544, 16830, 27060, 62244, 82680, 90090, 175440, 237456, 249424, 273819, 413820, 431548, 534660, 860706, 1074744, 1205750, 1306620, 1630200, 1764070, 1962820, 1983150
Offset: 1

Views

Author

T. D. Noe, Aug 25 2004; Sep 07 2004

Keywords

Comments

These numbers were found by exhaustive search. The sums are not unique; for n=2856, there are two representations. The Mathematica code prints n, the range of cubes in the sum and the number of cubes in the sum. For instance, 82680^3 equals the sum of 6591 cubes! A faster program was used to check all sums s of consecutive cubes such that s < 2000000^3.
2856^3 is the only cube < 2*10^23 that is a sum in two different ways. 2856^3 = 213^3 +...+ 555^3 = 273^3 +...+ 560^3. - Donovan Johnson, Feb 22 2011
The terms of this sequence tend to contain only small primes. Is a(n)^(1/3) an upper bound for the largest prime factor of a(n)? - Ralf Stephan, May 22 2013
Note that by Fermat's theorem no cube is the sum of two positive cubes.
The cubes of the terms form a subsequence of A265845 (numbers that are sums of consecutive positive cubes in more than one way) which is sparse: among the first 1000 terms of A265845, only 17 are cubes. - Jonathan Sondow, Jan 10 2016

Examples

			20 is in this sequence because 11^3 + 12^3 + 13^3 + 14^3 = 20^3.
		

Crossrefs

Cf. A097812 (n^2 is the sum of consecutive squares), A265845.
See A131643 for the actual cubes.

Programs

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

Formula

a(n) = A131643(n)^(1/3). - Jonathan Sondow, Jan 10 2016

Extensions

Name edited by Altug Alkan, Dec 07 2015

A383359 Integers m such that m^4 is the sum of squares of two or more consecutive positive integers.

Original entry on oeis.org

13, 295, 330, 364, 1085, 5005, 6305, 15516, 415151, 1990368, 34011252, 42016497, 79565281, 139107722, 254801664, 418093065, 667378972, 1214995500, 3609736702, 4353556896
Offset: 1

Views

Author

Zhining Yang, May 01 2025

Keywords

Comments

a(21) > 10^10. - Xianwen Wang, May 08 2025
Terms of A383653 such that the consecutive integers are all positive.
From David A. Corneth, May 04 2025: (Start)
The sum of the first m positive squares is f(m) = m*(m + 1)*(2*m + 1) / 6.
The sum of consecutive squares m^2 + (m+1)^2 + ... + t^2 where 0 < m <= t may be written as f(t) - f(m-1) for some t and m.
From there we can factor out t - m - 1 and solve the system of equations going over divisors of 6*m^4.
To get divisors of 6*m^4 we need to factor 6*m^4 which can be done using the factors of 6 and the factors of m. Doing so makes we need to factorize smaller numbers. (End)

Examples

			295 is a term because 295^4 = 6453^2 + 6454^2 + ... + 6628^2 + 6629^2.
		

Crossrefs

Programs

  • Mathematica
    d[m_] := Select[Divisors[6 m^4], 1 < # < Floor@ CubeRoot[3 m^4] &&
        IntegerQ[1/6 (-3 (1 + #) + Sqrt[3 (12 m^4/# + 1 - #^2)])] &];
    Do[If[Length@d[m] > 0, Print[m]], {m, 1, 10000}]

Extensions

a(11)-a(18) from Xianwen Wang, May 04 2025
a(19)-a(20) from Xianwen Wang, May 08 2025

A299173 a(n) is the maximum number of squared consecutive positive integers into which the integer n can be partitioned.

Original entry on oeis.org

1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 2, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 2, 4, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Jean-François Alcover, Feb 04 2018

Keywords

Comments

a(k^2)>=1, the inequality being strict if k is in A097812.

Examples

			25 = 5^2 = 3^2 + 4^2 and no such partition is longer, so a(25) = 2.
30 = 1^2 + 2^2 + 3^2 + 4^2 and no such partition is longer, so a(30) = 4.
2018 = 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2 + 13^2 + 14^2 + 15^2 + 16^2 + 17^2 + 18^2 and no such partition is longer, so a(2018) = 12. (This special example is due to _Seiichi Manyama_.) - _Jean-François Alcover_, Feb 05 2018
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(1)..a(N)
    A:= Vector(N):
    S:= n -> n*(n+1)*(2*n+1)/6:
    M:= floor(sqrt(N)):
    for d from 1 to M do
      for b from d to M do
        s:= S(b) - S(b-d);
        if s > N then break fi;
        A[s]:= d
    od od:
    convert(A,list); # Robert Israel, Feb 04 2018
  • Mathematica
    terms = 100; jmax = Ceiling[Sqrt[terms]]; kmax = Ceiling[(3*terms)^(1/3)]; Clear[a]; a[_] = 0; Do[r = Range[j, j + k - 1]; n = r . r; If[k > a[n], a[n] = k], {j, jmax}, {k, kmax}]; Array[a, terms]

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.

A383653 Integers m such that m^4 is the sum of squares of two or more consecutive integers, positive or negative.

Original entry on oeis.org

1, 13, 26, 33, 295, 330, 364, 1085, 5005, 5546, 5682, 6305, 6538, 15516, 415151, 1990368, 3538366, 34011252, 42016497, 79565281, 139107722, 175761059, 254801664, 418093065, 667378972, 1214995500, 3609736702, 4353556896
Offset: 1

Views

Author

Xianwen Wang, May 04 2025

Keywords

Comments

a(29) > 10^10.
From David A. Corneth, May 04 2025: (Start)
The sum of the first m positive squares is f(m) = m*(m + 1)*(2*m + 1) / 6.
The sum of consecutive squares m^2 + (m+1)^2 + ... + t^2 where 0 < m <= t may be written as f(t) - f(m-1) for some t and m.
From there we can factor out t - m - 1 and solve the system of equations going over divisors of 6*m^4.
To get divisors of 6*m^4 we need to factor 6*m^4 which can be done using the factors of 6 and the factors of m. Doing so makes we need to factorize smaller numbers. (End)

Examples

			5546 is a term because 5546^4 = (-22205)^2 + (-22204)^2 + ... + 141400^2 + 141401^2.
		

Crossrefs

Programs

  • Mathematica
    lst={};Monitor[Do[mm=6 m^4;div=TakeWhile[Divisors[mm][[2;;-2]],2mm/#+1>#^2&];
    ans=Select[div,IntegerQ[Sqrt[(2mm/#+1-#^2)/3]]&&Mod[#-Sqrt[(2mm/#+1-#^2)/3],2]==1&];
    If[Length[ans]>0,tmp={m,{#,q=Sqrt[(2mm/#+1-#^2)/3],p=(q+1-#)/2}&/@ans};Print[tmp];
    AppendTo[lst,tmp]],{m,1,10^4}],m];lst

A383654 a(n) is the number k such that A383653(n)^4 is the sum of squares of k consecutive integers.

Original entry on oeis.org

2, 2, 169, 242, 177, 352, 1536, 2401, 40898, 163607, 230121, 60625, 218089, 185761, 19512097, 47761921, 1170329056, 1224370081, 7957888849, 10842382346, 11474926944, 208152552417, 12230369281, 190412616875, 497818686976, 72899460001, 1384334025217, 313455536641
Offset: 1

Views

Author

Xianwen Wang, May 04 2025

Keywords

Examples

			Case a(1)=2: 13^4 = 119^2 + 120^2, 1^4 = 0^2 + 1^2.
Case a(3)=169: 26^4 = (-67+1)^2 + (-67+2)^2 + ... + (-67+168)^2 + (-67+169)^2.
Case a(5)=177: 295^4 = (6452+1)^2 + (6452+2)^2 + ... + (6452+176)^2 + (6452+177)^2.
...
Case a(10)=163607: 5546^4 = (-22206+1)^2 + (-22206+2)^2 + ... + (-22206+163606)^2 + (-22206+163607)^2.
		

Crossrefs

Programs

  • Mathematica
    lst={};Monitor[Do[mm=6 m^4;div=TakeWhile[Divisors[mm][[2;;-2]],2mm/#+1>#^2&];
    ans=Select[div,IntegerQ[Sqrt[(2mm/#+1-#^2)/3]]&&Mod[#-Sqrt[(2mm/#+1-#^2)/3],2]==1&];
    If[Length[ans]>0,tmp={m,{#,q=Sqrt[(2mm/#+1-#^2)/3],p=(q+1-#)/2}&/@ans};Print[tmp];
    AppendTo[lst,tmp]],{m,1,10^4}],m];lst

A151556 Values of (n^5+47*n)/48 as n ranges over the numbers that are == +-1 mod 6.

Original entry on oeis.org

1, 70, 357, 3366, 7748, 29597, 51604, 134113, 203475, 427344, 596471, 1094240, 1444702, 2413711, 3062718, 4778067, 5884949, 8712458, 10485145, 14894314, 17595816, 24172785, 28127672, 37588181, 43189063, 56391412, 64105419, 82063428, 92438690, 116334659
Offset: 1

Views

Author

Keywords

Comments

((n^5+47n)/48)^2 is the sum of the squares of the n^2 integers from (n^4-24n^2-25)/48 to (n^4+24n^2-73)/48. For example, when n=5, 70^2 is the sum of the 25 squares of the integers from 0 to 24.

Crossrefs

Programs

  • Magma
    [((2*n-1)*(81*n^4-162*n^3+144*n^2-63*n+58)+(135*n^4-270*n^3+210*n^2-75*n+26)*(-1)^n)/32: n in [1..30]]; // Vincenzo Librandi, Oct 25 2014
  • Mathematica
    With[{nn=20},(#^5+47#)/48&/@Sort[Join[6Range[0,nn]+1,6Range[nn]-1]]] (* Harvey P. Dale, Nov 15 2011 *)

Formula

a(n) = a(n-1)+5*a(n-2)-5*a(n-3)-10*a(n-4)+10*a(n-5)+10*a(n-6)-10*a(n-7)-5*a(n-8)+5*a(n-9)+a(n-10)-a(n-11). [R. J. Mathar, May 21 2009]
G.f.: x*(1 +69*x +282*x^2 +2664*x^3 +2957*x^4 +7494*x^5 +2957*x^6 +2664*x^7 +282*x^8 +69*x^9 +x^10)/((1+x)^5*(x-1)^6). [R. J. Mathar, May 21 2009]
a(n) = ((2*n-1)*(81*n^4-162*n^3+144*n^2-63*n+58)+(135*n^4-270*n^3+210*n^2-75*n+26)*(-1)^n)/32. - Tani Akinari, Oct 25 2014
Showing 1-10 of 10 results.