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.

A217843 Numbers which are the sum of one or more consecutive nonnegative cubes.

Original entry on oeis.org

0, 1, 8, 9, 27, 35, 36, 64, 91, 99, 100, 125, 189, 216, 224, 225, 341, 343, 405, 432, 440, 441, 512, 559, 684, 729, 748, 775, 783, 784, 855, 1000, 1071, 1196, 1241, 1260, 1287, 1295, 1296, 1331, 1584, 1728, 1729, 1800, 1925, 1989, 2016, 2024, 2025, 2197
Offset: 1

Views

Author

T. D. Noe, Oct 23 2012

Keywords

Comments

Contains A000578 (cubes), A005898 (two consecutive cubes), A027602 (three consecutive cubes), A027603 (four consecutive cubes) etc. - R. J. Mathar, Nov 04 2012
See A265845 for sums of consecutive positive cubes in more than one way. - Reinhard Zumkeller, Dec 17 2015
From Lamine Ngom, Apr 15 2021: (Start)
a(n) can always be expressed as the difference of the squares of two triangular numbers (A000217).
A168566 is the subsequence A000217(n)^2 - 1.
a(n) is also the product of two nonnegative integers whose sum and difference are both promic.
See example and formula sections for details. (End)

Examples

			From _Lamine Ngom_, Apr 15 2021: (Start)
Arrange the positive terms in a triangle as follows:
n\k |   1    2    3    4    5    6    7
----+-----------------------------------
  0 |   1;
  1 |   8,   9;
  2 |  27,  35,  36;
  3 |  64,  91,  99, 100;
  4 | 125, 189, 216, 224, 225;
  5 | 216, 341, 405, 432, 440, 441;
  6 | 343, 559, 684, 748, 775, 783, 784;
Column 1: cubes = A000217(n+1)^2 - A000217(n)^2.
The difference of the squares of two consecutive triangular numbers (A000217) is a cube (A000578).
Column 2: sums of 2 consecutive cubes (A027602).
Column 3: sums of 3 consecutive cubes (A027603).
etc.
Column k: sums of k consecutive cubes.
Row n: A000217(n)^2 - A000217(m)^2, m < n.
T(n,n) = A000217(n)^2 (main diagonal).
T(n,n-1) = A000217(n)^2 - 1 (A168566) (2nd diagonal).
Now rectangularize this triangle as follows:
n\k |   1    2     3     4    5     6   ...
----+--------------------------------------
  0 |   1,   9,   36,  100,  225,  441, ...
  1 |   8,  35,   99,  224,  440,  783, ...
  2 |  27,  91,  216,  432,  775, 1287, ...
  3 |  64, 189,  405,  748, 1260, 1989, ...
  4 | 125, 341,  684, 1196, 1925, 2925, ...
  5 | 216, 559, 1071, 1800, 2800, 4131, ...
  6 | 343, 855, 1584, 2584, 3915, 5643, ...
The general form of terms is:
T(n,k) = [n^4 + A016825(k)*n^3 + A003154(k)*n^2 + A300758(k)*n]/4, sum of n consecutive cubes after k^3.
This expression can be factorized into [n*(n + A005408(k))*(n*(n + A005408(k)) + 4*A000217(k))]/4.
For k = 1, the sequence provides all cubes: T(n,1) = A000578(k).
For k = 2, T(n,2) = A005898(k), centered cube numbers, sum of two consecutive cubes.
For k = 3, T(n,3) = A027602(k), sum of three consecutive cubes.
For k = 4, T(n,4) = A027603(k), sum of four consecutive cubes.
For k = 5, T(n,5) = A027604(k), sum of five consecutive cubes.
T(n,n) = A116149(n), sum of n consecutive cubes after n^3 (main diagonal).
For n = 0, we obtain the subsequence T(0,k) = A000217(n)^2, product of two numbers whose difference is 0*1 (promic) and sum is promic too.
For n = 1, we obtain the subsequence T(1,k) = A168566(x), product of two numbers whose difference is 1*2 (promic) and sum is promic too.
For n = 2, we obtain the subsequence T(2,k) = product of two numbers whose difference is 2*3 (promic) and sum is promic too.
etc.
For n = x, we obtain the subsequence formed by products of two numbers whose difference is the promic x*(x+1) and sum is promic too.
Consequently, if m is in the sequence, then m can be expressed as the product of two nonnegative integers whose sum and difference are both promic. (End)
		

Crossrefs

Cf. A265845 (subsequence).
Cf. A000217 (triangular numbers), A046092 (4*A000217).
Cf. A168566 (A000217^2 - 1).
Cf. A002378 (promics), A016825 (singly even numbers), A003154 (stars numbers).
Cf. A000330 (square pyramidal numbers), A300758 (12*A000330).
Cf. A005408 (odd numbers).

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert, Set)
    a217843 n = a217843_list !! (n-1)
    a217843_list = f (singleton (0, (0,0))) (-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, May 12 2015
    
  • Mathematica
    nMax = 3000; t = {0}; Do[k = n; s = 0; While[s = s + k^3; s <= nMax, AppendTo[t, s]; k++], {n, nMax^(1/3)}]; t = Union[t]
  • PARI
    lista(nn) = {my(list = List([0])); for (i=1, nn, my(s = 0); forstep(j=i, 1, -1, s += j^3; if (s > nn^3, break); listput(list, s););); Set(list);} \\ Michel Marcus, Nov 13 2020

Formula

a(n) >> n^2. Probably a(n) ~ kn^2 for some k but I cannot prove this. - Charles R Greathouse IV, Aug 07 2013
a(n) is of the form [x*(x+2*k+1)*(x*(x+2*k+1)+2*k*(k+1))]/4, sum of n consecutive cubes starting from (k+1)^3. - Lamine Ngom, Apr 15 2021

Extensions

Name edited by N. J. A. Sloane, May 24 2021

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

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

A062328 Length of period of continued fraction expansion of square root of 3^n+1.

Original entry on oeis.org

1, 0, 1, 4, 1, 26, 1, 56, 1, 44, 1, 264, 1, 814, 1, 136, 1, 3730, 1, 20968, 1, 2448, 1, 287980, 1, 397238, 1, 2678, 1, 670896, 1, 8110044, 1, 20696, 1, 1066520, 1, 366601254, 1, 277444, 1, 5903828476, 1, 7701738148, 1, 8208058, 1, 30287795640, 1, 253244432640, 1, 11656644672, 1, 2376211301858, 1, 590009437260, 1
Offset: 0

Views

Author

Labos Elemer, Jul 13 2001

Keywords

Comments

a(n) = 1 iff n is even. In this case, 3^n + 1 = A002522(3^(n/2)) and the continued fraction expansion of sqrt(3^n+1) is {3^(n/2); 2*3^(n/2), 2*3^(n/2), 2*3^(n/2), 2*3^(n/2), ...}. - Bernard Schott, Sep 25 2019

Examples

			The period of sqrt(244) contains 26 terms: [1, 1, 1, 1, 1, 2, 1, 5, 1, 1, 9, 1, 6, 1, 9, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 30], so a(5) = 26.
		

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nops(cfrac(sqrt(3^k+1),'periodic','quotients')[2]),k=2..18)];
  • Mathematica
    Table[Length[Last[ContinuedFraction[Sqrt[3^w+1]]]],{w,1,40}] (* corrected by Harvey P. Dale, Dec 05 2014 *)

Formula

a(n) = A003285(A034472(n)). - Bernard Schott, Sep 25 2019

Extensions

More terms from Harvey P. Dale, Dec 05 2014
a(41)-a(42) from Vaclav Kotesovec, Sep 17 2019
a(0), a(43)-a(48) from Chai Wah Wu, Sep 25 2019
a(49)-a(56) from Chai Wah Wu, Oct 03 2019

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.