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 25 results. Next

A034705 Numbers that are sums of consecutive squares.

Original entry on oeis.org

0, 1, 4, 5, 9, 13, 14, 16, 25, 29, 30, 36, 41, 49, 50, 54, 55, 61, 64, 77, 81, 85, 86, 90, 91, 100, 110, 113, 121, 126, 135, 139, 140, 144, 145, 149, 169, 174, 181, 190, 194, 196, 199, 203, 204, 221, 225, 230, 245, 255, 256, 265, 271, 280, 284, 285, 289, 294, 302
Offset: 1

Views

Author

Keywords

Comments

Also, differences of any pair of square pyramidal numbers (A000330). These could be called "truncated square pyramidal numbers". - Franklin T. Adams-Watters, Nov 29 2006
If n is the sum of d consecutive squares up to m^2, n = A000330(m) - A000330(m-d) = d*(m^2 - (d-1)*m + (d-1)*(2*d-1)/6) <=> m^2 - (d-1)*m = c := n/d - (d-1)*(2*d-1)/6 <=> m = (d-1)/2 + sqrt((d-1)^2/4 + c) which must be an integer. Moreover, A000330(x) >= x^3/3, so m and d can't be larger than (3*n)^(1/3). - M. F. Hasler, Jan 02 2024

Examples

			All squares (A000290: 0, 1, 4, 9, ...) are in this sequence, since "consecutive" in the definition means a subsequence without interruption, so a single term qualifies.
5 = 1^2 + 2^2 = A000330(2) is in this sequence, and similarly 13 = 2^2 + p3^2  = A000330(3) - A000330(1) and 14 = 1^2 + 2^2 + 3^2 = A000330(3), etc.
		

Crossrefs

Cf. A217843-A217850 (sums of consecutive powers 3 to 10).
Cf. A368570 (first of each pair of consecutive integers in this sequence).

Programs

  • Haskell
    import Data.Set (deleteFindMin, union, fromList); import Data.List (inits)
    a034705 n = a034705_list !! (n-1)
    a034705_list = f 0 (tail $ inits $ a000290_list) (fromList [0]) where
       f x vss'@(vs:vss) s
         | y < x = y : f x vss' s'
         | otherwise = f w vss (union s $ fromList $ scanl1 (+) ws)
         where ws@(w:_) = reverse vs
               (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 12 2015
    
  • Mathematica
    nMax = 1000; t = {0}; Do[k = n; s = 0; While[s = s + k^2; s <= nMax, AppendTo[t, s]; k++], {n, Sqrt[nMax]}]; t = Union[t] (* T. D. Noe, Oct 23 2012 *)
  • PARI
    {is_A034705(n)= for(d=1,sqrtnint(n*3,3), my(b = (d-1)/2, s = n/d - (d-1)*(d*2-1)/6 + b^2); denominator(s)==denominator(b)^2 && issquare(s, &s) && return(b+s)); !n} \\ Return the index of the largest square of the sum (or 1 for n = 0) if n is in the sequence, else 0. - 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 = None
        while True:
            (v, s, l) = heapq.heappop(h)
            if v != v1: yield v; 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(), 60))) # Michael S. Branicky, Jan 06 2024

Extensions

Terms a(1..10^4) double-checked with independent code by M. F. Hasler, Jan 02 2024

A217850 Numbers which are the sums of consecutive tenth powers.

Original entry on oeis.org

0, 1, 1024, 1025, 59049, 60073, 60074, 1048576, 1107625, 1108649, 1108650, 9765625, 10814201, 10873250, 10874274, 10874275, 60466176, 70231801, 71280377, 71339426, 71340450, 71340451, 282475249, 342941425, 352707050, 353755626, 353814675, 353815699
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Programs

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

A240137 Sum of n consecutive cubes starting from n^3.

Original entry on oeis.org

0, 1, 35, 216, 748, 1925, 4131, 7840, 13616, 22113, 34075, 50336, 71820, 99541, 134603, 178200, 231616, 296225, 373491, 464968, 572300, 697221, 841555, 1007216, 1196208, 1410625, 1652651, 1924560, 2228716, 2567573, 2943675, 3359656, 3818240, 4322241, 4874563
Offset: 0

Views

Author

Bruno Berselli, Apr 02 2014

Keywords

Comments

Sum_{i>=1} 1/a(i) = 1.0356568858420883122567711052556541...
Consider the partitions of 2n into two parts (p,q) where p <= q. Then a(n) is the total volume of the family of cubes with side length q. - Wesley Ivan Hurt, Apr 15 2018
A180920 lists the numbers k such that a(k) is a square. - Jon E. Schoenfield, Mar 13 2022

Examples

			a(3) = 216 because 216 = 3^3 + 4^3 + 5^3.
		

Crossrefs

Subsequence of A217843.
Cf. A116149: sum of n consecutive cubes after n^3.
Cf. A050410: sum of n consecutive squares starting from n^2.
Cf. A000326 (pentagonal numbers): sum of n consecutive integers starting from n.
Cf. A126274: n-th triangular number (A000217) * n-th pentagonal number (A000326).

Programs

  • Magma
    [n^2*(3*n-1)*(5*n-3)/4: n in [0..40]];
    
  • Maple
    A240137:=n->n^2*(3*n-1)*(5*n-3)/4; seq(A240137(n), n=0..40); # Wesley Ivan Hurt, May 09 2014
  • Mathematica
    Table[n^2 (3 n - 1) (5 n - 3)/4, {n, 0, 40}]
    CoefficientList[Series[x (1 + 30 x + 51 x^2 + 8 x^3)/(1 - x)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 09 2014 *)
  • PARI
    a(n)=n^2*(3*n-1)*(5*n-3)/4 \\ Charles R Greathouse IV, Oct 07 2015
  • Sage
    [n^2*(3*n-1)*(5*n-3)/4 for n in [0..40]]
    

Formula

G.f.: x*(1 + 30*x + 51*x^2 + 8*x^3)/(1 - x)^5.
a(n) = n^2*(3*n - 1)*(5*n - 3)/4 = A000326(n)*A000566(n).
a(n) = A116149(-n), with A116149(0)=0.
a(n) = Sum_{j=n..2n-1} j^3. - Jon E. Schoenfield, Mar 13 2022

A265845 Numbers that are sums of consecutive (positive) cubes in more than one way.

Original entry on oeis.org

216, 8000, 33075, 64000, 89559, 105525, 164800, 188784, 189189, 216000, 343000, 353241, 443456, 608391, 1271600, 2370816, 3132116, 3132675, 3184236, 5821200, 5832000, 9018000, 9769375, 11437525, 20793591, 22153600, 24359616, 28685440, 35937000, 47651373
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 16 2015

Keywords

Comments

A131643 (cubes that are also sums of three or more consecutive positive cubes) is a sparse subsequence: only 17 of its terms appear in the first 1000 terms of A265845. - Jonathan Sondow, Jan 10 2016

Examples

			a(1) = 216 = 6^3 = 3^3 + 4^3 + 5^3;
a(2) = 8000 = 20^3 = 11^3 + 12^3 + 13^3 + 14^3;
a(3) = 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

Subsequence of A217843; subsequences: A000578, A005898, A027602, A027603, A062682.
Supersequence of A131643.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert, Set)
    a265845 n = a265845_list !! (n-1)
    a265845_list = f (singleton (1, (1, 1))) 0 0 where
       f s z z' = if y == z && z' /= z then y : f s'' y z else f s'' y z
                  where s'' = (insert (y', (i, j')) $
                               insert (y' - i ^ 3 , (i + 1, j')) s')
                        y' = y + j' ^ 3; j' = j + 1
                        ((y, (i, j)), s') = deleteFindMin s

A217844 Numbers which are the sums of consecutive fourth powers.

Original entry on oeis.org

0, 1, 16, 17, 81, 97, 98, 256, 337, 353, 354, 625, 881, 962, 978, 979, 1296, 1921, 2177, 2258, 2274, 2275, 2401, 3697, 4096, 4322, 4578, 4659, 4675, 4676, 6497, 6561, 7793, 8418, 8674, 8755, 8771, 8772, 10000, 10657, 13058, 14354, 14641, 14979, 15235, 15316
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Crossrefs

Programs

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

A329636 Numbers that are sums of consecutive centered cube numbers (A005898).

Original entry on oeis.org

1, 9, 10, 35, 44, 45, 91, 126, 135, 136, 189, 280, 315, 324, 325, 341, 530, 559, 621, 656, 665, 666, 855, 900, 1089, 1180, 1215, 1224, 1225, 1241, 1414, 1729, 1755, 1944, 2035, 2070, 2079, 2080, 2096, 2331, 2655, 2970, 2996, 3059, 3185, 3276, 3311, 3320, 3321, 3825, 3925
Offset: 1

Views

Author

Ilya Gutkovskiy, Nov 18 2019

Keywords

Crossrefs

A180082 Semiprime centered cube numbers: m^3 + (m+1)^3.

Original entry on oeis.org

9, 35, 91, 341, 559, 1241, 6119, 7471, 17261, 19909, 75241, 143009, 257651, 323839, 671509, 860851, 967591, 1433969, 1482571, 1970299, 2348641, 2772559, 3413159, 4548059, 5313691, 5666509, 7233841, 7520291, 9568441
Offset: 1

Views

Author

Jonathan Vos Post, Feb 06 2011

Keywords

Comments

There are no prime centered cube numbers because m^3 + (m+1)^3 = (2m+1)*(m^2+m+1). - Zak Seidov, Feb 08 2011
Products of two primes p and q = (p^2+3)/4 with p's in A118939. - Zak Seidov, Feb 08 2011
From Lamine Ngom, Apr 17 2021: (Start)
Also numbers which are products of two primes whose sum and difference are both promic (A002378).
Subsequence of A217843 (sums of consecutive nonnegative cubes) limited to the terms that have only two prime factors (multiplicity counted).
As stated in A217843, any number that is the sum of consecutive nonnegative cubes can also be expressed as the product of two integers whose sum and difference are both promic. (Therefore, it cannot be prime.) It can also be expressed as the difference of the squares of two triangular numbers (A000217); thus, the two primes that are the factors of any term of this sequence are respectively the sum and difference of two triangular numbers. (End)

Examples

			a(1) = 1^3 + (1+1)^3 = 9 = 3^2 is semiprime.
a(2) = 2^3 + (2+1)^3 = 35 = 5 * 7.
a(3) = 3^3 + (3+1)^3 = 91 = 7 * 13.
		

Crossrefs

Programs

  • Mathematica
    Select[Total/@Partition[Range[200]^3,2,1],PrimeOmega[#]==2&] (* Harvey P. Dale, Feb 02 2019 *)

Formula

A001358 INTERSECTION A005898.

Extensions

More terms from Vincenzo Librandi, Feb 06 2011

A213188 Triangular numbers that are hypotenuse and a leg of a Pythagorean triple.

Original entry on oeis.org

10, 45, 136, 325, 435, 595, 630, 666, 780, 1225, 2080, 2145, 3321, 5050, 5565, 5886, 6216, 7381, 7503, 9316, 10440, 11026, 11175, 12246, 13530, 14196, 14365, 14535, 15753, 16653, 18915, 19306, 24310, 25425, 32896, 33670, 39060, 41905, 42195, 49141, 50721, 52650
Offset: 1

Views

Author

Antonio Roldán, Feb 28 2013

Keywords

Comments

The square of the third leg is a sum of consecutive cubes (or one cube). See A126200, A217843. In the Pythagorean triple {325,91,312}, 312^2 = 14^3 + 15^3 + ... + 25^3 = 97344.
It is possible for both of the legs to be triangular numbers as well as the hypotenuse. The only known example is 8778^2 + 10296^2 = 13530^2. - Andrew Howroyd, Aug 17 2018

Examples

			The triangular numbers 45 and 36 are the hypotenuse and leg of a Pythagorean triple {45, 36, 27}.
		

Crossrefs

Programs

  • PARI
    {for(i=1,10^3,k=1;v=1;a=i*(i+1)/2;while(k<=i-1&&v,b=k*(k+1)/2;if(issquare(a*a-b*b),v=0;print1(a,", "));k+=1))}

A265377 Sums of two or more consecutive positive cubes.

Original entry on oeis.org

9, 35, 36, 91, 99, 100, 189, 216, 224, 225, 341, 405, 432, 440, 441, 559, 684, 748, 775, 783, 784, 855, 1071, 1196, 1241, 1260, 1287, 1295, 1296, 1584, 1729, 1800, 1925, 1989, 2016, 2024, 2025, 2241, 2331, 2584, 2800, 2925, 2989, 3016, 3024, 3025, 3059, 3060
Offset: 1

Views

Author

Robert Israel, Dec 07 2015

Keywords

Comments

All numbers of the form A000537(b) - A000537(a) for 0 <= a <= b-2.
A217843 minus (A000578 minus A131643).
n is in the sequence iff n = s*t where (s+t)/2 = A000217(u) and (s-t)/2 = A000217(v) with u-v >= 2.
If a(k(n)) = A000537(n+1), k(n) >= A000217(n) for n > 0. - Altug Alkan, Dec 07 2015
See A062682 for sums of two or more consecutive positive cubes in more than one way. - Reinhard Zumkeller, Dec 16 2015

Examples

			a(1) = 1^3 + 2^3 = 9.
a(2) = 2^3 + 3^3 = 35.
a(3) = 1^3 + 2^3 + 3^3 = 36.
		

Crossrefs

Subset of A217843.
Cf. A062682 (subsequence).

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert, Set)
    a265377 n = a265377_list !! (n-1)
    a265377_list = f (singleton (1 + 2^3, (1, 2))) (-1) where
       f s z = if y /= z then y : f s'' y else f s'' y
                  where s'' = (insert (y', (i, j')) $
                               insert (y' - i ^ 3 , (i + 1, j')) s')
                        y' = y + j' ^ 3; j' = j + 1
                        ((y, (i, j)), s') = deleteFindMin s
    -- Reinhard Zumkeller, Dec 17 2015
  • Maple
    amin:= proc(b,N) local r;
      r:= b^2*(b+1)^2 - 4*N; if r > 0 then iroot(r,4) else 1 fi
    end proc:
    A265377:= proc(N) # to get all terms <= N
      local  a,b;
      sort(convert(select(`<=`,{seq(seq(b^2*(b+1)^2/4 - a^2*(a-1)^2/4,
           a = amin(b,N) .. b-1), b=2..1+iroot(floor(N/2),3))},N),list))
    end proc:
    A265377(10000);
  • Mathematica
    With[{nn=12},Select[Sort[Flatten[Table[Total/@Partition[Range[nn]^3,n,1],{n,2,nn}]]],#<=((nn(nn+1))/2)^3&]] (* Harvey P. Dale, Dec 25 2015 *)

A297199 a(n) = number of partitions of n into consecutive positive cubes.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jan 15 2018

Keywords

Examples

			    1 = 1^3,                   so   a(1) = 1.
    8 = 2^3,                   so   a(8) = 1.
    9 = 1^3 + 2^3,             so   a(9) = 1.
   27 = 3^3,                   so  a(27) = 1.
   35 = 2^3 + 3^3,             so  a(35) = 1.
   36 = 1^3 + 2^3 + 3^3,       so  a(36) = 1.
   64 = 4^3,                   so  a(64) = 1.
   91 = 3^3 + 4^3,             so  a(91) = 1.
   99 = 2^3 + 3^3 + 4^3,       so  a(99) = 1.
  100 = 1^3 + 2^3 + 3^3 + 4^3, so a(100) = 1.
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(1)..a(N)
    F:= (a, b) -> (b^2*(b+1)^2-a^2*(a-1)^2)/4:
    A:= Vector(N):
    for b from 1 to floor(N^(1/3)) do
      for a from b to 1 by -1 do
         v:= F(a,b);
         if v > N then break fi;
         A[v]:= A[v]+1;
    od od:
    convert(A,list); # Robert Israel, Jan 15 2018, corrected Jan 29 2018
  • PARI
    A297199(n) = { my(s=0, k=1, c); while((c=k^3) <= n, my(u=n-c, i=k); while(u>0, i++; c = i^3; u=u-c); s += (!u); k++); (s); }; \\ Antti Karttunen, Aug 22 2019

Formula

a(A217843(n)) >= 1 for n > 1.
a(n) >= 2 for n in A265845. - Robert Israel, Jan 15 2018
G.f.: Sum_{i>=1} Sum_{j>=i} Product_{k=i..j} x^(k^3). - Ilya Gutkovskiy, Apr 18 2019
a(A000578(n)) = A307609(n). - Antti Karttunen, Aug 22 2019
Showing 1-10 of 25 results. Next