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

A003329 Numbers that are the sum of 6 positive cubes.

Original entry on oeis.org

6, 13, 20, 27, 32, 34, 39, 41, 46, 48, 53, 58, 60, 65, 67, 69, 72, 76, 79, 83, 84, 86, 90, 91, 95, 97, 98, 102, 104, 105, 109, 110, 116, 117, 121, 123, 124, 128, 130, 132, 135, 136, 137, 139, 142, 143, 144, 146, 147, 151, 153, 154, 156, 158, 160, 161, 162, 163, 165, 170
Offset: 1

Views

Author

Keywords

Comments

As the order of addition doesn't matter we can assume terms are in increasing order. - David A. Corneth, Aug 01 2020

Examples

			From _David A. Corneth_, Aug 01 2020: (Start)
1647 is in the sequence as 1647 = 3^3 + 3^3 + 5^3 + 5^3 +  7^3 + 10^3.
3319 is in the sequence as 3319 = 5^3 + 5^3 + 5^3 + 6^3 + 10^3 + 12^3.
4038 is in the sequence as 4038 = 3^3 + 3^3 + 6^3 + 8^3 +  8^3 + 14^3. (End)
		

Crossrefs

Cf. A057907 (Complement)
Cf. A###### (x, y) = Numbers that are the sum of x nonzero y-th powers:
A000404 (2, 2), A000408 (3, 2), A000414 (4, 2), A047700 (5, 2),
A003325 (2, 3), A003072 (3, 3), A003327 .. A003335 (4 .. 12, 3),
A003336 .. A003346 (2 .. 12, 4), A003347 .. A003357 (2 .. 12, 5),
A003358 .. A003368 (2 .. 12, 6), A003369 .. A003379 (2 .. 12, 7),
A003380 .. A003390 (2 .. 12, 8), A003391 .. A004801 (2 .. 12, 9),
A004802 .. A004812 (2 .. 12, 10), A004813 .. A004823 (2 .. 12, 11).

Programs

  • Mathematica
    max = 200; cmax = Ceiling[(max - 5)^(1/3)]; cc = Array[c, 6]; iter = Sequence @@ Transpose[ {cc, Join[{1}, Most[cc]], Table[cmax, {6}]}]; Union[ Reap[ Do[ a = Total[cc^3]; If[a <= max, Sow[a]], Evaluate[iter]]][[2, 1]]] (* Jean-François Alcover, Oct 23 2012 *)
  • PARI
    (A003329_upto(N,k=6,m=3)=[i|i<-[1..#N=sum(n=1,sqrtnint(N,m), 'x^n^m, O('x^N))^k], polcoef(N,i)])(200) \\ M. F. Hasler, Aug 02 2020
    
  • Python
    from collections import Counter
    from itertools import combinations_with_replacement as multi_combs
    def aupto(lim):
      c = filter(lambda x: x<=lim, (i**3 for i in range(1, int(lim**(1/3))+2)))
      s = filter(lambda x: x<=lim, (sum(mc) for mc in multi_combs(c, 6)))
      counts = Counter(s)
      return sorted(k for k in counts)
    print(aupto(170)) # Michael S. Branicky, Jun 13 2021

Extensions

More terms from Eric W. Weisstein

A048927 Numbers that are the sum of 5 positive cubes in exactly 2 ways.

Original entry on oeis.org

157, 220, 227, 246, 253, 260, 267, 279, 283, 286, 305, 316, 323, 342, 344, 361, 368, 377, 379, 384, 403, 410, 435, 440, 442, 468, 475, 487, 494, 501, 523, 530, 531, 549, 562, 568, 586, 592, 594, 595, 599, 602, 621, 625, 640, 647, 657, 658, 683, 703, 710
Offset: 1

Views

Author

Keywords

Comments

It appears that this sequence has 15416 terms, the last of which is 2243453. - Donovan Johnson, Jan 11 2013
From a(1) = 157 we see that c(n) = (number of ways n is the sum of 5 cubes) coincides with A010057 = characteristic function of cubes, up to n = 156. This sequence lists the numbers n for which c(n) = 2. See A003328 for c(n) > 0 and A048926 for c(n) = 1. - M. F. Hasler, Jan 04 2023

Crossrefs

Cf. A003328 (sums of 5 positive cubes), A025404, A048926 (sum of 5 positive cubes in exactly 1 way), A048930, A294736, A343702, A343705, A344237.

Programs

  • Mathematica
    Select[ Range[ 1000], (test = Length[ Select[ PowersRepresentations[#, 5, 3], And @@ (Positive /@ #)& ] ] == 2; If[test, Print[#]]; test)& ](* Jean-François Alcover, Nov 09 2012 *)
  • PARI
    (waycount(n,numcubes,imax)={if(numcubes==0, !n, sum(i=1,imax, waycount(n-i^3,numcubes-1,i)))}); isA048927(n)=(waycount(n,5,floor(n^(1/3)))==2); \\ Michael B. Porter, Sep 27 2009
  • Python
    def ways (n, left = 5, last = 1):
      a = last; a3 = a**3; c = 0
      while a3 <= n-left+1:
        if left > 1:
           c += ways(n-a3, left-1, a)
        elif a3 == n:
           c += 1
        a += 1; a3 = a**3
      return c
    for n in range (1,1000): # to print this sequence
      if ways(n)==2: print(n,end=", ") # in Python2 use, e.g.: print n,
    # Minor edits by M. F. Hasler, Jan 04 2023
    

Extensions

More terms from Walter Hofmann (walterh(AT)gmx.de), Jun 01 2000

A048931 Numbers that are the sum of 6 positive cubes in exactly 3 ways.

Original entry on oeis.org

221, 254, 369, 411, 443, 469, 495, 502, 576, 595, 600, 648, 658, 684, 704, 711, 720, 739, 746, 753, 760, 765, 767, 772, 774, 779, 786, 793, 811, 818, 828, 835, 844, 854, 863, 866, 874, 880, 884, 886, 892, 893, 899, 905, 910, 919, 928, 929, 935, 936, 937
Offset: 1

Views

Author

Keywords

Comments

It appears that this sequence has 1141 terms, the last of which is 26132. - Donovan Johnson, Jan 09 2013

Examples

			221 is in the sequence since 221 = 216+1+1+1+1+1 = 125+64+8+8+8+8 = 64+64+64+27+1+1
		

Crossrefs

Programs

  • Mathematica
    Reap[For[n = 1, n <= 1000, n++, pr = Select[ PowersRepresentations[n, 6, 3], Times @@ # != 0 &]; If[pr != {} && Length[pr] == 3, Print[n, pr]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jul 31 2013 *)
  • PARI
    mx=10^6; ct=vector(mx); cb=vector(99); for(i=1, 99, cb[i]=i^3); for(i1=1, 99, s1=cb[i1]; for(i2=i1, 99, s2=s1+cb[i2]; if(s2+4*cb[i2]>mx, next(2)); for(i3=i2, 99, s3=s2+cb[i3]; if(s3+3*cb[i3]>mx, next(2)); for(i4=i3, 99, s4=s3+cb[i4]; if(s4+2*cb[i4]>mx, next(2)); for(i5=i4, 99, s5=s4+cb[i5]; if(s5+cb[i5]>mx, next(2)); for(i6=i5, 99, s6=s5+cb[i6]; if(s6>mx, next(2)); ct[s6]++)))))); n=0; for(i=6, mx, if(ct[i]==3, n++; write("b048931.txt", n " " i))) /* Donovan Johnson, Jan 09 2013 */

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Oct 02 2000

A048929 Numbers that are the sum of 6 positive cubes in exactly 1 way.

Original entry on oeis.org

6, 13, 20, 27, 32, 34, 39, 41, 46, 48, 53, 58, 60, 65, 67, 69, 72, 76, 79, 83, 84, 86, 90, 91, 95, 97, 98, 102, 104, 105, 109, 110, 116, 117, 121, 123, 124, 128, 130, 132, 135, 136, 137, 139, 142, 143, 144, 146, 147, 151, 153, 154, 156, 160, 161, 162, 163, 170
Offset: 1

Views

Author

Keywords

Comments

It appears that this sequence has 841 terms, the last of which is 19417. This means that all numbers greater than 19417 can be written as the sum of six positive cubes in at least two ways. - T. D. Noe, Dec 13 2006

Crossrefs

Cf. A057907 (numbers not the sum of six positive cubes)

Programs

  • Mathematica
    Select[ Range[200], Length[ Select[ PowersRepresentations[#, 6, 3], And @@ (Positive /@ #) &]] == 1 &] (* Jean-François Alcover, Oct 25 2012 *)
  • Python
    from collections import Counter
    from itertools import combinations_with_replacement as multi_combs
    def aupto(lim):
      c = filter(lambda x: x<=lim, (i**3 for i in range(1, int(lim**(1/3))+2)))
      s = filter(lambda x: x<=lim, (sum(mc) for mc in multi_combs(c, 6)))
      counts = Counter(s)
      return sorted(k for k in counts if counts[k]==1)
    print(aupto(20000)) # Michael S. Branicky, Jun 13 2021

A345814 Numbers that are the sum of six fourth powers in exactly two ways.

Original entry on oeis.org

261, 276, 291, 341, 356, 421, 516, 531, 596, 771, 885, 900, 965, 1140, 1361, 1509, 1556, 1571, 1636, 1811, 2180, 2596, 2611, 2661, 2691, 2706, 2721, 2741, 2756, 2771, 2786, 2836, 2931, 2946, 2961, 3011, 3026, 3091, 3186, 3201, 3220, 3266, 3285, 3300, 3315
Offset: 1

Views

Author

David Consiglio, Jr., Jun 26 2021

Keywords

Comments

Differs from A345559 at term 25 because 2676 = 1^4 + 1^4 + 2^4 + 4^4 + 7^4 = 1^4 + 1^4 + 1^4 + 3^4 + 6^4 + 6^4 = 2^4 + 2^4 + 3^4 + 3^4 + 3^4 + 7^4.

Examples

			276 is a term because 276 = 1^4 + 1^4 + 1^4 + 1^4 + 2^4 + 4^4 = 1^4 + 2^4 + 2^4 + 3^4 + 3^4 + 3^4.
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**4 for x in range(1, 1000)]
    for pos in cwr(power_terms, 6):
        tot = sum(pos)
        keep[tot] += 1
        rets = sorted([k for k, v in keep.items() if v == 2])
        for x in range(len(rets)):
            print(rets[x])

A345511 Numbers that are the sum of six cubes in two or more ways.

Original entry on oeis.org

158, 165, 184, 221, 228, 235, 247, 254, 256, 261, 268, 273, 275, 280, 282, 284, 287, 291, 294, 306, 310, 313, 317, 324, 331, 332, 343, 345, 347, 350, 352, 362, 369, 371, 373, 376, 378, 380, 385, 387, 388, 392, 395, 399, 404, 406, 408, 411, 418, 425, 430, 432
Offset: 1

Views

Author

David Consiglio, Jr., Jun 20 2021

Keywords

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**3 for x in range(1, 1000)]
    for pos in cwr(power_terms, 6):
        tot = sum(pos)
        keep[tot] += 1
        rets = sorted([k for k, v in keep.items() if v >= 2])
        for x in range(len(rets)):
            print(rets[x])

A345774 Numbers that are the sum of seven cubes in exactly two ways.

Original entry on oeis.org

131, 159, 166, 173, 185, 192, 211, 236, 243, 257, 264, 269, 274, 276, 288, 290, 292, 295, 299, 300, 302, 307, 309, 311, 314, 320, 321, 325, 332, 333, 337, 339, 340, 344, 348, 351, 353, 355, 358, 359, 360, 363, 372, 384, 385, 386, 388, 389, 393, 395, 398, 403
Offset: 1

Views

Author

David Consiglio, Jr., Jun 26 2021

Keywords

Comments

Differs from A345520 at term 8 because 222 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 6^3 = 1^3 + 1^3 + 1^3 + 3^3 + 4^3 + 4^3 + 4^3 = 1^3 + 2^3 + 2^3 + 2^3 + 2^3 + 4^3 + 5^3.
Likely finite.

Examples

			159 is a term because 159 = 1^3 + 1^3 + 1^3 + 1^3 + 3^3 + 3^3 + 3^3 = 1^3 + 1^3 + 2^3 + 2^3 + 2^3 + 2^3 + 4^3.
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**3 for x in range(1, 1000)]
    for pos in cwr(power_terms, 7):
        tot = sum(pos)
        keep[tot] += 1
        rets = sorted([k for k, v in keep.items() if v == 2])
        for x in range(len(rets)):
            print(rets[x])

A025459 Number of partitions of n into 6 positive cubes.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A025459 := proc(n)
        local a,x,y,z,u,v,wcu ;
        a := 0 ;
        for x from 1 do
            if 6*x^3 > n then
                return a;
            end if;
            for y from x do
                if x^3+5*y^3 > n then
                    break;
                end if;
                for z from y do
                    if x^3+y^3+4*z^3 > n then
                        break;
                    end if;
                    for u from z do
                        if x^3+y^3+z^3+3*u^3 > n then
                            break;
                        end if;
                        for v from u do
                            if x^3+y^3+z^3+u^3+2*v^3 > n then
                                break;
                            end if;
                            wcu := n-x^3-y^3-z^3-u^3-v^3 ;
                            if isA000578(wcu) then
                                a := a+1 ;
                            end if;
                        end do:
                    end do:
                end do:
            end do:
        end do:
    end proc: # R. J. Mathar, Sep 15 2015
    # Alternative:
    N:= 200:
    G:= mul(1/(1-y*x^(k^3)),k=1..floor(N^(1/3))):
    C6:= coeff(series(G,y,7),y,6):
    S:= series(C6,x,N+1):
    seq(coeff(S,x,i),i=0..N); # Robert Israel, May 10 2020
  • Mathematica
    a[n_] := Count[PowersRepresentations[n, 6, 3], pr_List /; FreeQ[pr, 0]];
    a /@ Range[0, 200] (* Jean-François Alcover, Jun 22 2020 *)
    Table[Count[IntegerPartitions[n,{6}],?(AllTrue[Surd[#,3],IntegerQ]&)],{n,0,110}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale, Jun 06 2021 *)

Formula

a(n) = [x^n y^6] Product_{k>=1} 1/(1 - y*x^(k^3)). - Ilya Gutkovskiy, Apr 23 2019
Showing 1-8 of 8 results.