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-6 of 6 results.

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

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

A234311 Least number which can be written as a sum of at least 2 consecutive squares in at least n different ways.

Original entry on oeis.org

5, 365, 147441, 554503705
Offset: 1

Views

Author

M. F. Hasler, Dec 23 2013

Keywords

Comments

No more terms < 10^18. [Lars Blomberg, Jun 02 2014]

Examples

			a(1) = 5 = 1^2 + 2^2.
a(2) = 365 = 10^2 + 11^2 + 12^2 = 13^2 + 14^2.
a(3) = 147441 = 85^2+...+101^2 = 29^2+...+77^2 = 18^2+...+76^2.
a(4) = 554503705 = 480^2+...+1210^2 = 3570^2+...+3612^2 = 3613^2+...+3654^2 = 7442^2+...+7451^2.
		

Crossrefs

A360762 a(n) is the least n-gonal number that is the sum of two or more consecutive nonzero n-gonal numbers in more than one way, or -1 if no such number exists.

Original entry on oeis.org

9, 12880, 20449, 10764222, 794629045, 33205080888, 5985, 13925100
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 19 2023

Keywords

Examples

			For n = 2: 9 = 2 + 3 + 4 = 4 + 5.
For n = 3: 12880 = 91 + ... + 903 = 300 + ... + 990.
For n = 4: 20449 = 7^2 + ... + 39^2 = 38^2 + ... + 48^2.
For n = 5: 10764222 = 1617 + ... + 115787 = 31032 + ... + 126005.
From _Michael S. Branicky_, Feb 19 2023: (Start)
n-th term and indices of n-gonal numbers summing to it:
a(2) = 9: 2..4, 4..5,
a(3) = 12880: 13..42, 24..44,
a(4) = 20449: 7..39, 38..48,
a(5) = 10764222: 33..278, 144..290,
a(6) = 794629045: 1305..1505, 5321..5334,
a(7) = 33205080888: 616..3422, 3235..4192,
a(8) = 5985: 1..18, 11..19,
a(9) = 13925100: 103..235, 220..282. (End)
		

Crossrefs

Extensions

a(6)-a(9) from Michael S. Branicky, Feb 19 2023

A379340 Integers m such that m^2 is the sum of two or more squares of consecutive integers in more than one way.

Original entry on oeis.org

70, 105, 143, 195, 2849, 3854, 5681, 8075, 143737, 144157, 208395, 939356, 1226670, 2259257, 2656724, 2741046, 4598528, 6555549, 7832413, 11818136, 19751043, 32938290, 429323037, 807759678, 1375704770, 1656510196, 1981351834
Offset: 1

Views

Author

Xianwen Wang, May 23 2025

Keywords

Examples

			105^2 = (-19)^2 + (-18)^2 + ... + 29^2 = (-21)^2 + (-20)^2 + ... + 28^2.
143^2 = 38^2 + 39^2 + ... + 48^2 = 7^2 + 8^2 + ... + 39^2.
2259257^2 = 26181^2 + 26182^2 + ... + 32158^2 = 9401^2 + 9402^2 + ... + 25273^2.
		

Crossrefs

Cf. A062681.
Subsequence of A174069.

A344338 Smallest number that is the sum of two or more consecutive positive n-th powers in more than one way.

Original entry on oeis.org

9, 365, 33075
Offset: 1

Views

Author

Ilya Gutkovskiy, May 15 2021

Keywords

Comments

a(4) > 10^24. - Bert Dobbelaere, May 16 2021
Conjecture: no terms exist for n >= 4. - Jon E. Schoenfield, May 16 2021

Examples

			9 = 2 + 3 + 4 = 4 + 5.
365 = 10^2 + 11^2 + 12^2 = 13^2 + 14^2.
33075 = 11^3 + 12^3 + 13^3 + 14^3 + 15^3 + 16^3 + 17^3 + 18^3 + 19^3 = 15^3 + 16^3 + 17^3 + 18^3 + 19^3 + 20^3.
		

Crossrefs

Programs

  • Python
    N=3 # <== Adapt here
    import heapq
    sigma=1+2**N
    h=[(sigma,1,2)]
    nextcount=3
    oldv,olds,oldl=0,0,0
    while True:
        (v,s,l)=heapq.heappop(h)
        if v==oldv:
            break
        if v>=sigma:
            sigma += nextcount**N
            heapq.heappush(h, (sigma,1,nextcount))
            nextcount+=1
        oldv,olds,oldl = v,s,l
        v-=s**N ; s+=1 ; l+=1 ;    v+=l**N
        heapq.heappush(h,(v,s,l))
    print("a(%d) = %d = sum(i^%d, i=%d..%d) = sum(i^%d, i=%d..%d)"%
        (N,v,N,olds,oldl,N,s,l))
    # Bert Dobbelaere, May 16 2021
Showing 1-6 of 6 results.