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.

Previous Showing 11-20 of 30 results. Next

A296338 a(n) = number of partitions of n into consecutive positive squares.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jan 14 2018

Keywords

Examples

			   1 = 1^2,                   so  a(1) = 1.
   4 = 2^2,                   so  a(4) = 1.
   5 = 1^2 + 2^2,             so  a(5) = 1.
   9 = 3^2,                   so  a(9) = 1.
  13 = 2^2 + 3^2,             so a(13) = 1.
  14 = 1^2 + 2^2 + 3^2,       so a(14) = 1.
  16 = 4^2,                   so a(16) = 1.
  25 = 3^2 + 4^2 = 5^2,       so a(25) = 2.
  29 = 2^2 + 3^2 + 4^2,       so a(29) = 1.
  30 = 1^2 + 2^2 + 3^2 + 4^2, so a(30) = 1.
		

Crossrefs

Programs

Formula

a(A034705(n)) >= 1 for n > 1.
G.f.: Sum_{i>=1} Sum_{j>=i} Product_{k=i..j} x^(k^2). - Ilya Gutkovskiy, Apr 18 2019

A319184 Numbers that are sums of consecutive pentagonal numbers.

Original entry on oeis.org

0, 1, 5, 6, 12, 17, 18, 22, 34, 35, 39, 40, 51, 57, 69, 70, 74, 75, 86, 92, 108, 117, 120, 121, 125, 126, 145, 156, 162, 176, 178, 190, 195, 196, 209, 210, 213, 247, 248, 262, 270, 279, 282, 287, 288, 321, 330, 354, 365, 376, 386, 387, 399, 404, 405, 424, 425, 438, 457, 475
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 21 2018

Keywords

Crossrefs

Programs

  • Mathematica
    anmax = 1000; nmax = Floor[Sqrt[2*anmax/3]] + 1; Select[Union[Flatten[Table[Sum[k*(3*k-1)/2, {k, i, j}], {i, 0, nmax}, {j, i, nmax}]]], # <= anmax &] (* Vaclav Kotesovec, Dec 21 2018 *)
    Module[{nn=20,pn},pn=PolygonalNumber[5,Range[0,nn]];Take[Union[Flatten[Table[Total/@Partition[pn,d,1],{d,nn}]]],60]] (* Harvey P. Dale, Jun 22 2025 *)

A322611 Numbers that are sums (of a nonempty sequence) of consecutive centered square numbers.

Original entry on oeis.org

1, 5, 6, 13, 18, 19, 25, 38, 41, 43, 44, 61, 66, 79, 84, 85, 102, 113, 127, 140, 145, 146, 181, 187, 198, 212, 221, 225, 230, 231, 258, 259, 265, 300, 313, 325, 326, 338, 343, 344, 365, 402, 404, 421, 439, 445, 470, 481, 483, 486, 488, 489, 524, 545, 547, 578, 585, 613, 626, 651, 660
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 20 2018

Keywords

Crossrefs

Programs

  • Mathematica
    anmax = 1000; nmax = Floor[Sqrt[anmax/2]] + 1; Select[Union[Flatten[Table[Sum[k^2 + (k + 1)^2, {k, i, j}], {i, 0, nmax}, {j, i, nmax}]]], # <= anmax &] (* Vaclav Kotesovec, Dec 21 2018 *)

A319185 Numbers that are sums of consecutive hexagonal numbers (A000384).

Original entry on oeis.org

0, 1, 6, 7, 15, 21, 22, 28, 43, 45, 49, 50, 66, 73, 88, 91, 94, 95, 111, 120, 139, 153, 154, 157, 160, 161, 190, 202, 211, 230, 231, 245, 251, 252, 273, 276, 277, 322, 325, 343, 350, 364, 365, 371, 372, 378, 421, 430, 435, 463, 475, 496, 503, 507, 518, 524, 525, 554, 561
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 21 2018

Keywords

Crossrefs

Programs

  • Mathematica
    anmax = 1000; nmax = Floor[Sqrt[anmax/2]] + 1; Select[Union[Flatten[Table[Sum[k*(2*k-1), {k, i, j}], {i, 0, nmax}, {j, i, nmax}]]], # <= anmax &] (* Vaclav Kotesovec, Dec 21 2018 *)

A320728 Numbers that are sums of consecutive odd squares (or centered octagonal numbers).

Original entry on oeis.org

0, 1, 9, 10, 25, 34, 35, 49, 74, 81, 83, 84, 121, 130, 155, 164, 165, 169, 202, 225, 251, 276, 285, 286, 289, 290, 361, 371, 394, 420, 441, 445, 454, 455, 514, 515, 529, 596, 625, 645, 650, 670, 679, 680, 683, 729, 802, 804, 841, 875, 885, 934, 959, 961, 968, 969, 970, 1044, 1089
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 21 2018

Keywords

Crossrefs

Programs

  • PARI
    ok(n)={my(i=sqrtint(n)); i=i-(i%2==0); while(i>0, my(a=i^2, j=i); while(j>0 && a<=n, if(a==n, return(1)); j-=2; a=a+j^2); i-=2); 0}
    concat([0], select(ok, [1..1200])) \\ Antonio Roldán, Mar 12 2020

A180436 Palindromic numbers which are sum of consecutive squares.

Original entry on oeis.org

1, 4, 5, 9, 55, 77, 121, 181, 313, 434, 484, 505, 545, 595, 636, 676, 818, 1001, 1111, 1441, 1771, 4334, 6446, 10201, 12321, 14641, 17371, 17871, 19691, 21712, 40804, 41214, 42924, 44444, 44944, 46564, 51015, 65756, 69696, 81818, 94249, 97679, 99199
Offset: 1

Views

Author

Zhining Yang, Jan 19 2011

Keywords

Comments

In more than one way: 554455, 9343439, ... (A267600) - Robert G. Wilson v, May 28 2012

Examples

			1001 is in the sequence because 1001 is palindromic and it can be written as sum of consecutive squares (1001 = 4^2 + 5^2 + 6^2 + ... + 13^2 + 14^2).
		

Crossrefs

Programs

  • Mathematica
    palQ[n_Integer] := Block[{idn = IntegerDigits[n]}, idn == Reverse[idn]]; lst = {}; k = 1; While[k < 1000, AppendTo[lst, Select[ Accumulate[ Range[k, 1000]^2], palQ]]; lst = Union@ Flatten@ lst; k++]; Select[lst, # < 10^6 &] (* Robert G. Wilson v, May 28 2012 *)

A216446 Palindromic numbers which can be written as the sum of two or more consecutive squares.

Original entry on oeis.org

5, 55, 77, 181, 313, 434, 505, 545, 595, 636, 818, 1001, 1111, 1441, 1771, 4334, 6446, 17371, 17871, 19691, 21712, 41214, 42924, 44444, 46564, 51015, 65756, 81818, 97679, 99199, 108801, 127721, 137731, 138831, 139931, 148841, 161161, 166661, 171171, 188881
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Examples

			636 is in the sequence because it is a palindrome and 636 = 4^2+5^2+6^2+7^2+8^2+9^2+10^2+11^2+12^2.
		

Crossrefs

Cf. A034705, A180436, A267600 (terms with more than one representation).

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; upto = 10^6; Union[ Reap[ For[i=1, s=i^2 + (i+1)^2; s < upto, i++, For[j=i+1, s < upto, j++; s += j^2, If[palQ[s], Sow@ s]]]][[2, 1]]] (* Giovanni Resta, Jun 14 2018 *)
    With[{nn=200},Select[Union[Flatten[Table[Total/@Partition[Range[nn]^2,n,1],{n,2,nn}]]],PalindromeQ]] (* Harvey P. Dale, Oct 17 2021 *)

Extensions

Errors in previous b-file noticed by Riley Waugh, Jun 13 2018

A368570 Numbers k such that both k and k+1 are the sums of consecutive squares.

Original entry on oeis.org

0, 4, 13, 29, 49, 54, 85, 90, 139, 144, 203, 255, 284, 365, 384, 505, 509, 649, 676, 728, 729, 818, 924, 960, 1013, 1014, 1201, 1210, 1225, 1239, 1454, 1495, 1784, 1854, 2108, 2214, 2469, 2665, 2779, 2813, 2814, 2869, 3025, 3135, 3309, 3310, 3794, 4230, 4323, 4324, 4705
Offset: 1

Views

Author

Allan C. Wechsler, Dec 30 2023

Keywords

Comments

A subsequence of A034705, identifying the lower of each pair of consecutive integers belonging to that sequence.
Similarly, two consecutive integers in this sequence, a(n+1) = a(n)+1, such as 1013 and 1014, or 3309 and 3310, correspond to three consecutive integers in A034705, and so on. - M. F. Hasler, Jan 02 2024

Examples

			85 = 6^2 + 7^2, and 86 = 3^2 + 4^2 + 5^2 + 6^2, so 85 is in the list.
		

Crossrefs

Cf. A034705.

Programs

  • Mathematica
    a[n_] := Module[{v, r = {}, s = 1, t, ul = 100, pr = 1}, While[Length[r] < n, v = ConstantArray[0, ul + 1]; Do[t = 0; Do[t += j^2; If[t <= ul + 1, v[[t]] = 1, Break[]], {j, i, 1, -1}], {i, 1, Sqrt[ul + 1]}]; Do[If[v[[i]] == 1, s++; If[s >= 2 && Not[MemberQ[r, i - 1]], AppendTo[r, i - 1]], s = 0], {i, pr, ul + 1}]; pr = ul + 1; ul *= 2; ]; Take[r, n]];
    a[49] (* Robert P. P. McKone, Dec 30 2023 *)
  • PARI
    \\ See PARI link
    
  • PARI
    is_A368570(n)=is_A034705(n)&&is_A034705(n+1) \\ M. F. Hasler, Jan 02 2024
    
  • Python
    import heapq
    from itertools import islice
    def agen(): # generator of terms
        m = 0; h = [(m, 0, 0)]; nextcount = 1; v1 = -2
        while True:
            (v, s, l) = heapq.heappop(h)
            if v != v1:
                if v1 + 1 == v: yield v1
                v1 = v
            if v >= m:
                m += nextcount*nextcount
                heapq.heappush(h, (m, 1, nextcount))
                nextcount += 1
            v -= s*s; s += 1; l += 1; v += l*l
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 51))) # Michael S. Branicky, Jan 01 2024

Extensions

More terms from Jon E. Schoenfield, 30 Dec 2023

A217845 Numbers which are the sums of consecutive fifth powers.

Original entry on oeis.org

0, 1, 32, 33, 243, 275, 276, 1024, 1267, 1299, 1300, 3125, 4149, 4392, 4424, 4425, 7776, 10901, 11925, 12168, 12200, 12201, 16807, 24583, 27708, 28732, 28975, 29007, 29008, 32768, 49575, 57351, 59049, 60476, 61500, 61743, 61775, 61776, 91817, 100000, 108624
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Programs

  • Mathematica
    nMax = 200000; t = {0}; Do[k = n; s = 0; While[s = s + k^5; s <= nMax, AppendTo[t, s]; k++], {n, nMax^(1/5)}]; t = Union[t]

A217846 Numbers which are the sums of consecutive sixth powers.

Original entry on oeis.org

0, 1, 64, 65, 729, 793, 794, 4096, 4825, 4889, 4890, 15625, 19721, 20450, 20514, 20515, 46656, 62281, 66377, 67106, 67170, 67171, 117649, 164305, 179930, 184026, 184755, 184819, 184820, 262144, 379793, 426449, 442074, 446170, 446899, 446963, 446964, 531441
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Subsequences include A001014 and A008516.

Programs

  • Mathematica
    nMax = 10^6; t = {0}; Do[k = n; s = 0; While[s = s + k^6; s <= nMax, AppendTo[t, s]; k++], {n, nMax^(1/6)}]; t = Union[t]
  • PARI
    list(lim)=my(v=List(apply(n->n^6, [0..sqrtnint(lim\=1,6)])),s); for(n=2,lim, s=n*(n-1)*(2*n-1)*(3*n^4-6*n^3+3*n+1)/42; if(s>lim,break); for(k=n,lim, s+=k^6-(k-n)^6; if(s>lim,break); listput(v,s))); Set(v) \\ Charles R Greathouse IV, Apr 22 2020
Previous Showing 11-20 of 30 results. Next