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 21-30 of 30 results.

A217849 Numbers which are the sums of consecutive ninth powers.

Original entry on oeis.org

0, 1, 512, 513, 19683, 20195, 20196, 262144, 281827, 282339, 282340, 1953125, 2215269, 2234952, 2235464, 2235465, 10077696, 12030821, 12292965, 12312648, 12313160, 12313161, 40353607, 50431303, 52384428, 52646572, 52666255, 52666767, 52666768, 134217728
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Programs

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

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.

A217847 Numbers which are the sums of consecutive seventh powers.

Original entry on oeis.org

0, 1, 128, 129, 2187, 2315, 2316, 16384, 18571, 18699, 18700, 78125, 94509, 96696, 96824, 96825, 279936, 358061, 374445, 376632, 376760, 376761, 823543, 1103479, 1181604, 1197988, 1200175, 1200303, 1200304, 2097152, 2920695, 3200631, 3278756, 3295140
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Programs

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

A217848 Numbers which are the sums of consecutive eighth powers.

Original entry on oeis.org

0, 1, 256, 257, 6561, 6817, 6818, 65536, 72097, 72353, 72354, 390625, 456161, 462722, 462978, 462979, 1679616, 2070241, 2135777, 2142338, 2142594, 2142595, 5764801, 7444417, 7835042, 7900578, 7907139, 7907395, 7907396, 16777216, 22542017, 24221633, 24612258
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Programs

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

A256677 Primes whose nearest neighbors are both the sum of consecutive squares.

Original entry on oeis.org

1291, 37813, 48091, 76091, 100829, 120091, 167911, 193549, 271639, 281291, 436621, 847727, 847741, 1188529, 1705549, 2933083, 3126173, 5451643, 7703653, 9623533, 9755149, 10468261, 11971373, 17424301, 20892871, 20967883
Offset: 1

Views

Author

Torlach Rush, Jun 26 2015

Keywords

Examples

			a(1) = 1291; 1290 = 14^2 + ... + 18^2; 1292 = 9^2 + ... + 16^2.
a(2) = 37813; 37812 = 29^2 + ... + 51^2; 37814 = 32^2 + ... + 52^2.
		

Crossrefs

Cf. A034705.

A322135 Table of truncated square pyramid numbers, read by antidiagonals.

Original entry on oeis.org

1, 4, 5, 9, 13, 14, 16, 25, 29, 30, 25, 41, 50, 54, 55, 36, 61, 77, 86, 90, 91, 49, 85, 110, 126, 135, 139, 140, 64, 113, 149, 174, 190, 199, 203, 204, 81, 145, 194, 230, 255, 271, 280, 284, 285, 100, 181, 245, 294, 330, 355, 371, 380, 384, 385, 121, 221, 302
Offset: 1

Views

Author

Allan C. Wechsler, Nov 27 2018

Keywords

Comments

The n-th row contains n numbers: n^2, n^2 + (n-1)^2, ..., n^2 + (n-1)^2 + ... + 1^2.
All numbers that appear in the table are listed in ascending order at A034705.
All numbers that appear twice or more are listed at A130052.
The left column is A000290 (the squares).
The top row is A000330 (the square pyramidal numbers).
The columns are A000290, A099776 (or a tail of A001844), a tail of A005918 or A120328, a tail of A027575, a tail of A027578, a tail of A027865, ...
The first two rows are A000330 and a tail of A168599, but subsequent rows are not currently in the OEIS, and are all tails of A000330 minus various constants.
The main diagonal is A050410.

Examples

			The 17th term is entry 2 on antidiagonal 6, so we sum two terms: 6^2 + 5^2 = 61.
Table begins:
   1   5  14  30  55  91 140 204 ...
   4  13  29  54  90 139 203 ...
   9  25  50  86 135 199 ...
  16  41  77 126 190 ...
  25  61 110 174 ...
  36  85 149 ...
  49 113 ...
  64 ...
  ...
		

Crossrefs

See comments; also cf. A000330, A059255.

Programs

  • Mathematica
    T[n_,k_] = Sum[(n+i)^2, {i,0,k-1}]; Table[T[n-k+1, k], {n,1,10},  {k,1,n}] // Flatten (* Amiram Eldar, Nov 28 2018 *)
    f[n_] := Table[SeriesCoefficient[-((y (y (1 + y) + x (1 - 2 y - 3 y^2) + x^2 (1 - 3 y + 4 y^2)))/((-1 + x)^3 (-1 + y)^4)) , {x, 0,
    i + 1 - j}, {y, 0, j}], {i, n, n}, {j, 1, n}]; Flatten[Array[f, 10]] (* Stefano Spezia, Nov 28 2018 *)

Formula

T(n,k) = n^2 + (n+1)^2 + ... + (n+k-1)^2 = A000330(n + k - 1) - A000330(n - 1) = T(n, k) = k*n^2 + (k^2 - k)*n + (1/3*k^3 - 1/2*k^2 + 1/6*k)
G.f.: -y*(y*(1 + y) + x*(1 - 2*y - 3*y^2) + x^2*(1 - 3*y + 4*y^2))/((- 1 + x)^3*(- 1 + y)^4). - Stefano Spezia, Nov 28 2018

A368590 Numbers k such that all of k, k+1 and k+2 are the sums of consecutive squares.

Original entry on oeis.org

728, 1013, 2813, 3309, 4323, 4899, 12438, 21259, 23113, 31394, 35719, 37812, 38023, 111894, 143449, 194053, 418613, 418614, 487368, 535309, 2232593, 2452644, 2490669, 9226854, 17367998, 19637644, 20341453, 28553671, 33406839, 174398434, 468936719, 1468970139, 2136314464
Offset: 1

Views

Author

David A. Corneth, Dec 31 2023

Keywords

Comments

418613 is the smallest k such that k through k + 3 are the sums of consecutive squares.
After an idea by Allan C. Wechsler.
a(30)-a(33) were calculated using the b-file at A368570.

Examples

			728 is in the sequence via 728 = 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2 + 13^2, 729 = 27^2 and 730 = 10^2 + 11^2 + 12^2 + 13^2 + 14^2.
		

Crossrefs

Subsequence of A034705 and of A368570.

Programs

  • PARI
    \\ See PARI program
    
  • Python
    import heapq
    from itertools import islice
    def agen(): # generator of terms
        m = 1; h = [(m, 1, 1)]; nextcount = 2
        v1 = v2 = -1
        while True:
            (v, s, l) = heapq.heappop(h)
            if v != v1:
                if v2 + 2 == v1 + 1 == v: yield v2
                v2, 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(), 33))) # Michael S. Branicky, Jan 01 2024

A273874 Least positive integer k such that k^2 + (k+1)^2 + ... + (k+n-2)^2 + (k+n-1)^2 is the sum of two nonzero squares. a(n) = 0 if no solution exists.

Original entry on oeis.org

5, 1, 2, 0, 2, 0, 0, 0, 0, 2, 5, 1, 12, 0, 3, 0, 3, 0, 0, 0, 0, 0, 53, 1, 1, 1, 2, 0, 4, 0, 0, 0, 5, 2, 0, 0, 2, 0, 3, 0, 5, 0, 0, 5, 0, 0, 73, 1, 3, 1, 2, 0, 2, 0, 5, 0, 0, 2, 97, 1, 4, 0, 0, 0, 2, 5, 0, 0, 30, 0, 0, 0, 1, 1, 4, 0, 0, 0, 0, 0, 0, 2, 26, 0, 6
Offset: 1

Views

Author

Altug Alkan, Jun 02 2016

Keywords

Comments

Least positive integer k such that Sum_{i=0..n-1} (k+i)^2 = n*(6*k^2 + 6*k*n - 6*k + 2*n^2 - 3*n + 1)/6 is the sum of two nonzero squares. a(n) = 0 if no k exists for corresponding n.

Examples

			a(1) = 5 because 5^2 = 3^2 + 4^2.
a(3) = 2 because 2^2 + 3^2 + 4^2 = 2^2 + 5^2.
		

Crossrefs

Extensions

a(7)-a(50) from Giovanni Resta, Jun 02 2016
More terms from Jinyuan Wang, May 02 2021

A364143 a(n) is the minimal number of consecutive squares needed to sum to A216446(n).

Original entry on oeis.org

2, 5, 3, 2, 2, 3, 10, 2, 7, 9, 12, 11, 6, 11, 14, 3, 11, 29, 14, 7, 23, 4, 49, 8, 24, 5, 17, 12, 38, 46, 27, 34, 6, 14, 22, 66, 11, 66, 14, 11, 6, 77, 36, 63, 96, 11, 50, 3, 19, 96, 52, 41, 66, 33, 11, 3, 14, 121, 66, 89, 34, 127, 51, 2, 86, 54, 181, 48, 8
Offset: 1

Views

Author

Darío Clavijo, Jul 10 2023

Keywords

Examples

			a(8) = 7 is because 7 consecutive squares are needed to sum to A216446(8) = 595 = 6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2.
		

Crossrefs

Programs

  • Python
    is_palindrome = lambda n: str(n) == str(n)[::-1]
    def g(L):
      L2, squares, D = L*L, [x*x for x in range(0, L + 1)], {}
      for i in range(1, L + 1):
        for j in range(i + 1, L + 1):
          candidate = sum(squares[i:j+1])
          if candidate < L2 and is_palindrome(candidate):
            if candidate in D:
              D[candidate]= min(D[candidate], j-i-1)
            else:
              D[candidate] = j-i+1
      return [D[k] for k in sorted(D.keys())]
    print(g(1000))
Previous Showing 21-30 of 30 results.