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.

A002376 Least number of positive cubes needed to sum to n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 3, 4, 5, 1, 2, 3, 4, 5, 4, 5, 6, 2, 3, 4, 5, 6, 5, 6, 7, 3, 4, 5, 6, 7, 6, 7, 8, 4, 5, 6, 2, 3, 4, 5, 6, 5, 6, 7, 3, 4, 1, 2, 3, 4, 5, 6, 4, 5, 2, 3, 4, 5, 6, 7, 5, 6, 3, 3, 4, 5, 6, 7, 6, 7, 4, 4, 5, 2, 3, 4, 5, 6, 5, 5, 6, 3, 4, 5, 6, 7, 6, 6
Offset: 1

Views

Author

Keywords

Comments

No terms are greater than 9, see A002804. - Charles R Greathouse IV, Aug 01 2013

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 81.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. R. Zornow, De compositione numerorum e cubis integris positivus, J. Reine Angew. Math., 14 (1835), 276-280.

Crossrefs

Cf. A000578, A003325 (numbers requiring 2 cubes), A047702 (numbers requiring 3 cubes), A047703 (numbers requiring 4 cubes), A047704 (numbers requiring 5 cubes), A046040 (numbers requiring 6 cubes), A018890 (numbers requiring 7 cubes), A018888 (numbers requiring 8 or 9 cubes), A055401 (cubes needed by greedy algorithm).

Programs

  • Maple
    f:= proc(n) option remember;
      min(seq(procname(n - i^3)+1, i=1..floor(n^(1/3))))
    end proc:
    f(0):= 0:
    map(f, [$1..100]); # Robert Israel, Jun 30 2017
  • Mathematica
    CubesCnt[n_] := Module[{k = 1}, While[Length[PowersRepresentations[n, k, 3]] == 0, k++]; k]; Array[CubesCnt, 100] (* T. D. Noe, Apr 01 2011 *)
  • Python
    from itertools import count
    from sympy.solvers.diophantine.diophantine import power_representation
    def A002376(n):
        if n == 1: return 1
        for k in count(1):
            try:
                next(power_representation(n,3,k))
            except:
                continue
            return k # Chai Wah Wu, Jun 25 2024

Formula

The g.f. conjectured by Simon Plouffe in his 1992 dissertation,
-(-1-z-z^2-z^3-z^4-z^5-z^6+6*z^7)/(z+1)/(z^2+1)/(z^4+1)/(z-1)^2, is incorrect: the first wrong coefficient is that of z^26. - Robert Israel, Jun 30 2017

Extensions

More terms from Arlin Anderson (starship1(AT)gmail.com)

A055401 Number of positive cubes needed to sum to n using the greedy algorithm.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 3, 4, 5, 6, 7, 8, 9, 10, 4, 5, 6, 2, 3, 4, 5, 6, 7, 8, 9, 3, 4, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 3, 4, 5, 6, 7, 8, 9, 10, 4, 5, 6, 2, 3, 4, 5, 6, 7, 8, 9, 3, 4, 5, 6, 7
Offset: 0

Views

Author

Henry Bottomley, May 16 2000

Keywords

Comments

Define f(n) = n - k^3 where (k+1)^3 > n >= k^3; a(n) = number of steps such that f(f(...f(n)))= 0.
Also sum of digits when writing n in base where place values are positive cubes, cf. A000433. [Reinhard Zumkeller, May 08 2011]

Examples

			a(32)=6 because 32=27+1+1+1+1+1 (not 32=8+8+8+8).
a(33)=7 because 33=27+1+1+1+1+1+1 (not 33=8+8+8+8+1).
		

Crossrefs

Cf. A002376 (least number of positive cubes needed to represent n; differs from this sequence for the first time at n=32, where a(32)=6, while A002376(32)=4).

Programs

  • Haskell
    a055401 n = s n $ reverse $ takeWhile (<= n) $ tail a000578_list where
      s _ []                 = 0
      s m (x:xs) | x > m     = s m xs
                 | otherwise = m' + s r xs where (m',r) = divMod m x
    -- Reinhard Zumkeller, May 08 2011
    
  • Maple
    f:= proc(n,k) local m, j;
    if n = 0 then return 0 fi;
    for j from k by -1 while j^3 > n do od:
    m:= floor(n/j^3);
    m + procname(n-m*j^3, j-1);
    end proc:
    seq(f(n,floor(n^(1/3))),n=0..100); # Robert Israel, Aug 17 2015
  • Mathematica
    a[0] = 0; a[n_] := {n} //. {b___, c_ /; !IntegerQ[c^(1/3)], d___} :> {b, f = Floor[c^(1/3)]^3, c - f, d} // Length; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 17 2015 *)
  • PARI
    F=vector(30,n,n^3); /* modify to get other sequences of "greedy representations" */
    last_leq(v,F)={local(j=1); while ( F[j]<=v, j+=1 ); F[j-1]} /* Return last element <=v in sorted array F[] */
    greedy(n,F)={local(v=n,ct=0); while ( v, v-=last_leq(v,F); ct+=1; ); ct}
    vector(min(100,F[#F-1]),n,greedy(n,F)) /* show terms */
    /* Joerg Arndt, Apr 08 2011 */
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A055401 n) (if (zero? n) n (+ 1 (A055401 (A055400 n)))))
    ;; Antti Karttunen, Aug 16 2015

Formula

a(0) = 0; for n >= 1, a(n) = a(n-floor(n^(1/3))^3)+1 = a(A055400(n))+1 = a(n-A048762(n))+1.

Extensions

a(0) = 0 prepended by Antti Karttunen, Aug 16 2015

A018889 Numbers whose shortest representation as a sum of positive cubes requires exactly 8 cubes.

Original entry on oeis.org

15, 22, 50, 114, 167, 175, 186, 212, 231, 238, 303, 364, 420, 428, 454
Offset: 1

Views

Author

Anonymous

Keywords

Comments

Wieferich proved that 167 is the unique prime in this sequence. - Jonathan Vos Post, Sep 23 2006

References

  • Joe Roberts, Lure of the Integers, entry 239.

Crossrefs

Subsequence of A018888.

Programs

  • Mathematica
    max = 500; nn = Union[(#*#).# & /@ Tuples[Range[0, 7], {7}]][[1 ;; max]]; Select[{#, PowersRepresentations[#, 8, 3]} & /@ Complement[Range[max], nn] , #[[2]] != {} &][[All, 1]] (* Jean-François Alcover, Jul 21 2011 *)

Extensions

Corrected by Arlin Anderson.
Additional comments from Jud McCranie.
Edited by N. J. A. Sloane, Aug 10 2022

A004829 Numbers that are the sum of at most 7 positive cubes.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Keywords

Comments

McCurley proves that every n > exp(exp(13.97)) is in A003330 and hence in this sequence. Siksek proves that all n > 454 are in this sequence. - Charles R Greathouse IV, Jun 29 2022

Crossrefs

Complement of A018889; subsequence of A003330.
Sums of k cubes, number of ways of writing n as, for k=1..9: A010057, A173677, A051343, A173678, A173679, A173680, A173676, A173681, A173682.
Cf. A018888.

A018890 Numbers whose smallest expression as a sum of positive cubes requires exactly 7 cubes.

Original entry on oeis.org

7, 14, 21, 42, 47, 49, 61, 77, 85, 87, 103, 106, 111, 112, 113, 122, 140, 148, 159, 166, 174, 178, 185, 204, 211, 223, 229, 230, 237, 276, 292, 295, 300, 302, 311, 327, 329, 337, 340, 356, 363, 390, 393, 401, 412, 419, 427, 438, 446, 453, 465, 491, 510, 518, 553, 616
Offset: 1

Views

Author

Anonymous

Keywords

Comments

It is conjectured that a(121)=8042 is the last term - Jud McCranie
An unpublished result of Deshouillers-Hennecart-Landreau, combined with Lemma 3 from Bertault, Ramaré, & Zimmermann implies that if there are any terms beyond a(121) = 8042, they are greater than 1.62 * 10^34. - Charles R Greathouse IV, Jan 23 2014

References

  • J. Roberts, Lure of the Integers, entry 239.

Crossrefs

Programs

  • Mathematica
    Select[Range[700], (pr = PowersRepresentations[#, 7, 3]; pr != {} && Count[pr, r_/; (Times @@ r) == 0] == 0)&] (* Jean-François Alcover, Jul 26 2011 *)

A158794 Multiples of 4 which are not the sum of seven nonnegative cubes.

Original entry on oeis.org

212, 364, 420, 428
Offset: 1

Views

Author

Jonathan Vos Post, Mar 26 2009

Keywords

Comments

Boklan and Elkies: It is conjectured that every integer N>454 is the sum of seven nonnegative cubes. We prove the conjecture when N is a multiple of 4.
Elkies [2010]: It is conjectured that every integer N>454 is the sum of seven nonnegative cubes. We prove the conjecture when N is congruent to 2 mod 4. This result, together with a recent proof for 4|N, shows that the conjecture is true for all even N. - Jonathan Vos Post, Sep 22 2010

References

  • U. V. Linnik: On the representation of large numbers as sums of seven cubes. Rec. Math. [=Mat. Sbornik] N.S. 12(54) (1943), 218-224.
  • L. E. Dickson: All integers except 23 and 239 are the sums of 8 cubes. Bull. Amer. Math. Soc. 45 (1939), 588-591.

Crossrefs

Extensions

Definition corrected by Jonathan Sondow, Mar 14 2014
Showing 1-6 of 6 results.