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 10 results.

A030052 Smallest number whose n-th power is a sum of distinct smaller positive n-th powers.

Original entry on oeis.org

3, 5, 6, 15, 12, 25, 40, 84, 47, 63, 68, 81, 102, 95, 104, 162, 123
Offset: 1

Views

Author

Richard C. Schroeppel

Keywords

Comments

Sprague has shown that for any n, all sufficiently large integers are the sum of distinct n-th powers. Sequence A001661 lists the largest number not of this form, so we know that a(n) is less than or equal to the next larger n-th power. - M. F. Hasler, May 25 2020
a(18) <= 200, a(19) <= 234, a(20) <= 242; for more upper bounds see the Al Zimmermann's Programming Contests link: The "Final Report" gives exact solutions for n = 16 through 30; those for n = 16 and 17 have been confirmed to be minimal by Jeremy Sawicki. - M. F. Hasler, Jul 20 2020

Examples

			3^1 = 2^1 + 1^1, and there is no smaller solution given that the r.h.s. is the smallest possible sum of distinct positive powers.
For n = 2, one sees immediately that 3 is not a solution (3^2 > 2^2 + 1^2) and one can check that 4^2 isn't equal to Sum_{x in A} x^2 for any subset A of {1, 2, 3}. Therefore, the well known hypotenuse number 5 (cf. A009003) with 5^2 = 4^2 + 3^2 provides the smallest possible solution.
a(17) = 123 since 123^17 = Sum {3, 5, 7, 8, 9, 11, 13, 16, 17, 19, 30, 33, 34, 35, 38, 40, 41, 43, 51, 52, 54, 55, 58, 59, 60, 63, 66, 69, 70, 71, 72, 73, 75, 76, 81, 86, 87, 88, 89, 90, 92, 95, 98, 106, 107, 108, 120}^17, with obvious notation. [Solution found by Jeremy Sawicki on July 3, 2020, see Al Zimmermann's Programming Contests link.] - _M. F. Hasler_, Jul 18 2020
For more examples, see the link.
		

Crossrefs

Other sequences defined by sums of distinct n-th powers: A001661, A364637.

Programs

  • PARI
    A030052(n, m=n\/log(2)+1, s=0)={if(!s, until(A030052(n, m, (m+=1)^n),), s < 2^n || s > (m+n+1)*m^n\(n+1), m=s<2, m=min(sqrtnint(s, n), m); s==m^n || until( A030052(n, m-1, s-m^n) || (s>=(m+n)*(m-=1)^n\(n+1) && !m=0), )); m} \\ Does exhaustive search to find the least solution m. Use optional 2nd arg to specify a starting value for m. Calls itself with nonzero 3rd (optional) argument: in this case, returns nonzero iff s is the sum of powers <= m^n. - For illustration only: takes very long already for n = 8 and n >= 10. - M. F. Hasler, May 25 2020

Formula

a(n) <= A001661(n)^(1/n) + 1. - M. F. Hasler, May 25 2020
a(n) >= A332101(n) = A078607(n)+2 (conjectured). - M. F. Hasler, May 25 2020

Extensions

a(8)-a(10) found by David W. Wilson
a(11) from Al Zimmermann, Apr 07 2004
a(12) from Al Zimmermann, Apr 13 2004
a(13) from Manol Iliev, Jan 04 2010
a(14) and a(15) from Manol Iliev, Apr 28 2011
a(16) and a(17) due to Jeremy Sawicki, added by M. F. Hasler, Jul 20 2020

A078607 Least positive integer x such that 2*x^n > (x+1)^n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 10, 12, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 40, 42, 43, 45, 46, 48, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 102
Offset: 0

Views

Author

Jon Perry, Dec 09 2002

Keywords

Comments

Also, integer for which E(s) = s^n - Sum_{0 < k < s} k^n is maximal. It appears that a(n) + 2 is the least integer for which E(s) < 0. - M. F. Hasler, May 08 2020

Examples

			a(2) = 3 as 2^2 = 4, 3^2 = 9 and 4^2 = 16.
For n = 777451915729368, a(n) = 1121626023352384 = ceiling(n log 2), where n*log(2) = 1121626023352383.5 - 2.13*10^-17 and 2*floor(n log 2)^n / floor(1 + n log 2)^n = 1 - 3.2*10^-32. - _M. F. Hasler_, Nov 02 2013
a(2) is given by floor(1/(1-1/sqrt(2))). [From former A230748.]
		

Crossrefs

Cf. A224996 (the largest integer x that satisfies 2*x^n <= (x+1)^n).
Cf. A078608, A078609. Equals A110882(n)-1 for n > 0.
Cf. A332097 (maximum of E(s), cf comments), also related to this: A332101 (least k such that k^n <= sum of all smaller n-th powers), A030052 (least k such that k^n = sum of distinct n-th powers), A332065 (all k such that k^n is a sum of distinct n-th powers).

Programs

  • Mathematica
    Table[SelectFirst[Range@ 120, 2 #^n > (# + 1)^n &], {n, 0, 71}] (* Michael De Vlieger, May 01 2016, Version 10 *)
  • PARI
    for (n=2,50, x=2; while (2*x^n<=((x+1)^n),x++); print1(x","))
    
  • PARI
    a(n)=1\(1-1/2^(1/n)) \\ Charles R Greathouse IV, Oct 31 2013
    
  • PARI
    apply( A078607(n)=ceil(1/if(n>1,sqrtn(2,n)-1,!n+n/2)), [0..80]) \\ M. F. Hasler, May 08 2020

Formula

a(n) = ceiling(1/(2^(1/n)-1)) for n > 1. (For n = 1 resp. 0 this gives the integer 1 resp. infinity as argument of ceiling.) [Edited by M. F. Hasler, May 08 2020]
For most n, a(n) is the nearest integer to n/log(2), but there are exceptions, including n=777451915729368.
Following formulae merged in from former A230748, M. F. Hasler, May 14 2020:
a(n) = floor(1/(1-1/2^(1/n))).
a(n) = n/log(2) + O(1). - Charles R Greathouse IV, Oct 31 2013
a(n) = floor(1/(1-x)) with x^n = 1/2: f(n) = 1/(2^(1/n)-1) is never an integer for n > 1, whence floor(f(n)+1) = ceiling(f(n)) = a(n). - M. F. Hasler, Nov 02 2013, and Gabriel Conant, May 01 2016

Extensions

Edited by Dean Hickerson, Dec 17 2002
Initial terms a(0) = 1 and a(1) = 2 added by M. F. Hasler, Nov 02 2013

A332101 Least m such that m^n <= Sum_{k

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 42, 44, 45, 47, 48, 50, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 91, 93, 94, 96, 97
Offset: 0

Views

Author

M. F. Hasler, Apr 14 2020

Keywords

Comments

In a list (1^n, 2^n, 3^n, ...) (rows of table A051128 or A051129), a(n) is the index of the first term less than or equal to the sum of all earlier terms, cf. example.
Obviously a lower bound for any s solution to s^n = Sum_{x in S} x^n, S subset of {1, ..., s-1}, cf. A030052.

Examples

			For n = 0, m^0 > Sum_{0 < k < m} k^0 = 0 for m = 0, 1 (empty sums), but 2^0 = Sum_{0 < k < 2} k^0 = 1, so a(0) = 2.
For n = 1, 1^1 > Sum_{0 < k < 1} k^1 = 0 (empty sum) and 2^1 > Sum_{0 < k < 2} k^1 = 1, but 3^1 <= Sum_{0 < k < 3} k^1 = 1 + 2, so a(1) = 3.
To find a(n) one can add up terms in row n of the table k^n until the sum equals or exceeds the next term, whose column number k is then a(n):
  n |k: 1  2   3   4    5    6          Comment
  --+---------------------------------------------------------------
  1 |  1   2   3                  1 < 2 but 1 + 2 >= 3, so a(1) = 3.
  2 |  1   4   9  16   25         1 + 4 + 9 + 16 > 25, and a(2) = 5.
  3 |  1   8  27  64  125  216    1 + 8 + 27 + 64 + 125 > 216: a(3) = 6.
		

Crossrefs

Cf. A078607, A332097 (maximum of E(s), cf comments), A030052 (least k such that k^n = sum of distinct n-th powers), A332065 (all k such that k^n is a sum of distinct n-th powers).

Programs

  • Mathematica
    Table[Block[{m = 1, s = 0}, While[m^n > s, s = s + m^n; m++]; m], {n, 0, 66}] (* Michael De Vlieger, Apr 30 2020 *)
  • PARI
    apply( A332101(n,s)=for(m=1,oo, s
    				

Formula

a(n) = round(n / log(2)) + 2. (Conjectured; verified up to 10^4, in particular for 3525/log(2) = 5085.500019... and 7844/log(2) ~ 11316.49990...)
a(n) = A078607(n) + 2 for almost all n > 1. (n = 777451915729368 might be an exception to this equality or the above one.) - M. F. Hasler, May 08 2020

A332097 Maximum of s^n - Sum_{0 < x < s} x^n.

Original entry on oeis.org

1, 1, 4, 28, 317, 4606, 84477, 1919575, 47891482, 1512466345, 48627032377, 1930020260416, 77986967769593, 3624337209819538, 178110510699972510, 9381158756438306167, 548676565488760277878, 31900481466759651567625, 2189463436999785648552851, 144075114432622269076465962
Offset: 0

Views

Author

M. F. Hasler, May 07 2020

Keywords

Comments

For small values of s, we have Sum_{0 < x < s} x^n ~ (s-1)^n, but for s > n/log(2) + 1.5 (cf. A332101) the difference E(s) = s^n - Sum_{0 < x < s} x^n becomes negative. Just before, the difference has its maximum: We have E(s) < E(s+1) <=> 2*s^n < (s+1)^n <=> s < 1/(2^(1/n)-1), so E takes its maximum at s = A078607(n), the least integer larger than this limiting value. This appears to be almost always equal to A332101(n) - 2.

Crossrefs

Cf. A030052 (least k such that k^n = sum of distinct n-th powers).
Cf. A078607 (s for which E(s) = a(n) <=> least k such that 2*k^n > (k+1)^n).
Cf. A332065 (all k such that k^n is a sum of distinct n-th powers).
Cf. A332101 (least k such that k^n <= sum of all smaller n-th powers).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, (s->
          s^n-add(x^n, x=1..s-1))(ceil(1/(2^(1/n)-1))))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, May 09 2020
  • Mathematica
    a[0] = 1; a[n_] := (s = Ceiling[1/(2^(1/n) - 1)])^n - Sum[k^n, {k, 1, s - 1}]; Array[a, 20, 0] (* Amiram Eldar, May 09 2020 *)
  • PARI
    {apply( A332097(n,s=1\(sqrtn(2,n-!n)-1))=(s+1)^n-sum(k=1,s,k^n), [0..20])}

Formula

a(n) = s^n - Sum_{0 < x < s} x^n for s = ceiling(1/(2^(1/n)-1)) = A078607(n).

A003999 Sums of distinct nonzero 4th powers.

Original entry on oeis.org

1, 16, 17, 81, 82, 97, 98, 256, 257, 272, 273, 337, 338, 353, 354, 625, 626, 641, 642, 706, 707, 722, 723, 881, 882, 897, 898, 962, 963, 978, 979, 1296, 1297, 1312, 1313, 1377, 1378, 1393, 1394, 1552, 1553, 1568, 1569, 1633, 1634, 1649, 1650, 1921, 1922
Offset: 1

Views

Author

Keywords

Comments

5134240 is the largest positive integer not in this sequence. - Jud McCranie
If we tightened the sequence requirement so that the sum was of more than one 4th power, we would remove exactly 32 4th powers from the terms: row 4 of A332065 indicates which 4th powers would remain. After a(1) = 1, the next number in this sequence that is in the analogous sequences for cubes and squares is a(24) = 881 = A364637(4). - Peter Munn, Aug 01 2023

References

  • The Penguin Dictionary of Curious and Interesting Numbers, David Wells, entry 5134240.

Crossrefs

Cf. A046039 (complement).
Cf. A003995, A003997, A194768, A194769 (analogs for squares, cubes, 5th and 6th powers).
A217844 is a subsequence.

Programs

  • Maple
    (1+x)*(1+x^16)*(1+x^81)*(1+x^256)*(1+x^625)*(1+x^1296)*(1+x^2401)*(1+x^4096)*(1+x^6561)*(1+x^10000)
  • Mathematica
    max = 2000; f[x_] := Product[1 + x^(k^4), {k, 1, 10}]; Exponent[#, x]& /@ List @@ Normal[Series[f[x], {x, 0, max}]] // Rest (* Jean-François Alcover, Nov 09 2012, after Charles R Greathouse IV *)
  • PARI
    upto(lim)={
        lim\=1;
        my(v=List(),P=prod(n=1,lim^(1/4),1+x^(n^4),1+O(x^(lim+1))));
        for(n=1,lim,if(polcoeff(P,n),listput(v,n)));
        Vec(v)
    }; \\ Charles R Greathouse IV, Sep 02 2011

Formula

For n > 4244664, a(n) = n + 889576. - Charles R Greathouse IV, Sep 02 2011

A194768 Sum of distinct positive fifth powers.

Original entry on oeis.org

1, 32, 33, 243, 244, 275, 276, 1024, 1025, 1056, 1057, 1267, 1268, 1299, 1300, 3125, 3126, 3157, 3158, 3368, 3369, 3400, 3401, 4149, 4150, 4181, 4182, 4392, 4393, 4424, 4425, 7776, 7777, 7808, 7809, 8019, 8020, 8051, 8052, 8800, 8801, 8832, 8833, 9043, 9044, 9075, 9076
Offset: 1

Views

Author

Keywords

Comments

From Peter Munn, Aug 02 2023: (Start)
67898771 = A001661(5) is the largest number not in the sequence.
After a(1) = 1, the next term that is in all the analogous sequences for smaller powers is a(35) = 7809 = A364637(5).
If we tightened the sequence requirement so that the sum was of more than one 5th power, we would remove exactly 24 5th powers from the terms: row 5 of A332065 indicates which 5th powers would remain.
(End)

Crossrefs

Cf. A000584 (5th powers), A001661, A332065, A364637.
Cf. A003997, A003999, A194769 (analogs for 3rd, 4th and 6th powers).
A217845 is a subsequence.

Programs

  • Maple
    N:= 2*10^4: # to get all terms <= N
    S:= {0}:
    for i from 1 while i^5 <= N do
      S:= select(`<=`, map(`+`,S,i^5),N) union S
    od:
    sort(convert(S minus {0},list)); # Robert Israel, Jun 26 2019
  • PARI
    upto(lim)={
        lim\=1;
        my(v=List(),P=prod(n=1,lim^(1/5),1+x^(n^5),1+O(x^(lim+1))));
        for(n=1,lim,if(polcoeff(P,n),listput(v,n)));
        Vec(v)
    }; \\ Charles R Greathouse IV, Sep 02 2011

Formula

For n > 53986089, a(n) = n + 13912682. [Charles R Greathouse IV, Sep 02 2011]

Extensions

Name qualified by Peter Munn, Aug 02 2023

A194769 Sum of distinct nonzero sixth powers.

Original entry on oeis.org

1, 64, 65, 729, 730, 793, 794, 4096, 4097, 4160, 4161, 4825, 4826, 4889, 4890, 15625, 15626, 15689, 15690, 16354, 16355, 16418, 16419, 19721, 19722, 19785, 19786, 20450, 20451, 20514, 20515, 46656, 46657, 46720, 46721, 47385, 47386, 47449, 47450, 50752, 50753, 50816
Offset: 1

Views

Author

Keywords

Comments

See A001661 for a proof of the formula. - M. F. Hasler, May 15 2020
From Peter Munn, Aug 02 2023: (Start)
11146309947 = A001661(6) is the largest number not in the sequence.
After a(1) = 1, the next term that is in all the analogous sequences for smaller powers is a(86) = 134067 = A364637(6).
If we tightened the sequence requirement so that the sum was of more than one 6th power, we would remove exactly 30 6th powers from the terms: row 6 of A332065 indicates which 6th powers would remain.
(End)

Crossrefs

A217846 is a subsequence.
Cf. A003997, A003999, A194768 (analogs for 3rd, 4th and 5th powers).

Programs

  • PARI
    upto(lim)={
        lim\=1;
        my(v=List(),P=prod(n=1,lim^(1/6),1+x^(n^6),1+O(x^(lim+1))));
        for(n=1,lim,if(polcoeff(P,n),listput(v,n)));
        Vec(v)
    }

Formula

For n > 9108736851, a(n) = n + 2037573096.

Extensions

More terms from David A. Corneth, Apr 21 2020
Name qualified by Peter Munn, Aug 02 2023

A332066 Number of positive integers whose n-th power is not the sum of distinct smaller positive n-th powers.

Original entry on oeis.org

2, 6, 9, 32, 24, 30, 41, 83, 49, 62, 71, 83
Offset: 1

Views

Author

M. F. Hasler, Jul 19 2020

Keywords

Comments

See A332065 for the numbers whose n-th power is the sum of distinct smaller positive n-th powers. This sequence counts the positive integers not in a given row n of that table, whence the formula.

Examples

			For n = 1, only s = 1 and s = 2 are not the sum of distinct smaller positive integers (to the power n = 1), for all s >= 3 on we have s^1 = 1^1 + (s-1)^1 with 1 and s-1 distinct positive integers. Thus a(1) = #{1, 2} = 2.
For n = 2, S2 = {1, 2, 3, 4, 6, 8} is the set of all s > 0 whose square is not the sum of distinct smaller squares, while 5^2 = 4^2 + 3^2, 7^2 = 6^2 + 3^2 + 2^2, and all s^2 >= 9^2 are also the sum of distinct smaller squares. Thus a(2) = #S2 = 6.
		

Crossrefs

Formula

a(n) = lim_{k -> oo} A332065(n,k) - k.
a(n) <= A332098(n) with equality iff A030052(n) = A332098(n) + 1 <=> A030052(n) > A332098(n), which happens for n = 1, 8, 10, ... The difference A332098(n) - a(n) is the number of "solutions" s (listed in rows of A332065) strictly less than the largest "non-solution" A332098(n).

A332098 Largest m for which m^n = Sum_{x in S} x^n has no solution S subset of {1, ..., m-1}.

Original entry on oeis.org

2, 8, 11, 44, 27, 33, 42, 83, 51, 62, 72, 83
Offset: 1

Views

Author

M. F. Hasler, Apr 19 2020

Keywords

Comments

Row n of table A332065 lists all s for which there is some S subset of {1,...,m-1} with s^n = Sum_{x in S} x^n. This is the case for all sufficiently large s (cf. reference there). Here we give the largest integer not in this list.
Sequence A030052 lists the smallest m for which there is a solution, so a(n) >= A030052(n) - 1. We have a(9) = 51 = A030052(9) + 4, a(10) = 62 = A030052(10) - 1, a(11) = 72 = A030052(11) + 4. - M. F. Hasler, May 14 2020, edited Jul 19 2020

Examples

			For n=1, we have m^n = (m-1)^n + 1^n, so S = {1, m-1} is a solution for all m > 2, but 2^n > 1^n and therefore no solution with m = 2 = a(1).
For n=2, we have a solution to m^n = Sum_{x in S} x^n for S subset of {1,...,m-1} for all m > 8 (cf. FORMULA in A332065), but no solution with m = 8 = a(2).
		

Crossrefs

Formula

a(n) = A030052(n) - 1 or a(n) > A030052(n).
a(n) < A001661(n)^(1/n).

Extensions

a(8) - a(12) from M. F. Hasler, Jul 23 2020

A332099 Square array T(n,k) = k^n - Sum_{0 < i < k} e(i)*(k-i)^n where e(i) = 1 if the partial sum up to this term would remain <= k^n, or 0 else; n, k >= 1; read by falling antidiagonals.

Original entry on oeis.org

1, 1, 1, 0, 3, 1, 0, 4, 7, 1, 0, 2, 18, 15, 1, 0, 0, 28, 64, 31, 1, 0, 1, 25, 158, 210, 63, 1, 0, 0, 0, 271, 748, 664, 127, 1, 0, 1, 1, 317, 1825, 3302, 2058, 255, 1, 0, 0, 8, 126, 3351, 10735, 14068, 6304, 511, 1, 0, 2, 0, 45, 4606, 26141, 59425, 58718, 19170, 1023, 1, 0, 0, 19, 47, 3760, 50478, 183111, 318271, 241948, 58024, 2047, 1
Offset: 1

Views

Author

M. F. Hasler, Apr 19 2020

Keywords

Comments

To compute T(n,k), start from k^n, then subtract (progressively strictly) smaller n-th powers whenever possible.
Since we subtract the smaller n-th powers in a greedy way, T(n,k) may be nonzero even if k^n is a sum of smaller n-th powers: cf. rows of A332065 for these k.

Examples

			The square array starts
  n\k: 1   2    3     4      5      6     7     8     9    10    11    12    13
  --+----------------------------------------------------------------------------
  1 |  1   1    0     0      0      0     0     0     0     0     0     0     0
  2 |  1   3    4     2      0      1     0     1     0     2     0     2     0
  3 |  1   7   18    28     25      0     1     8     0    19    15    18     0
  4 |  1  15   64   158    271    317    126   45    47    59   191    61    285
  5 |  1  31  210   748   1825   3351   4606  3760  398   131   702     0   1229
  6 |  1  63  664  3302  10735  26141  50478 77324 84477 21595 55300 29603  2093
  (...)
Columns 1, 2, 3: A000012, A000225, |A083321|, cf. FORMULA.
We have T(2,10) = 10^2 - 9^2 - 4^2 - 1 = 2, because we first have to subtract 9^2 = 81, even though 10 is in row 2 of A332065 since 10^2 - 8^2 - 6^2 = 0.
		

Crossrefs

Cf. A030052 (least k such that k^n = sum of distinct n-th powers).
Cf. A332065 (all k such that k^n is a sum of distinct n-th powers).
Cf. A332101 (least k such that k^n <= sum of all smaller n-th powers).

Programs

  • PARI
    A332099(n,k,t=k^n)={while(k&&t,t-=(k=min(sqrtnint(t,n),k-1))^n);t}

Formula

T(n,k) > 0 for k < A030052(n), and T(n,k) = 0 for k = A030052(n).
T(n,k) = k^n - Sum_{0 < m < k} m^k for k < A332101(n).
T(n,1) = 1 = A000012(n); T(n,2) = 2^n - 1 = A000225(n);
T(n,3) = 3^n - 2^n - 1 = |A083321(n)|.
Showing 1-10 of 10 results.