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

A332096 Irregular table where T(n,m) = min_{A subset {1..m-1}} |m^n - Sum_{x in A} x^n|, for 1 <= m <= A332098(n) = largest m for which this is nonzero.

Original entry on oeis.org

1, 1, 1, 3, 4, 2, 0, 1, 0, 1, 1, 7, 18, 28, 25, 0, 1, 8, 0, 7, 1, 1, 15, 64, 158, 271, 317, 126, 45, 17, 59, 14, 2, 15, 3, 0, 2, 1, 2, 1, 2, 2, 2, 1, 2, 0, 2, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 31, 210, 748, 1825, 3351, 4606, 3760, 398, 131, 299, 0, 318, 0, 8
Offset: 1

Views

Author

M. F. Hasler, Jul 20 2020

Keywords

Comments

It is known (Sprague 1948, cf. A001661) that for any n, only a finite number of positive integers are not the sum of distinct positive n-th powers. Therefore each row is finite, their lengths are given by A332098.
The number of nonzero terms in row n is A332066(n).
The column of the first zero (exact solution m^n = Sum_{x in A} x^n) in each row is given by A030052, unless A030052(n) = A332066(n) + 1 = A332098(n) + 1.

Examples

			The table reads:
  n\ m=1   2    3    4     5     6     7     8    9   10   11  12   13
----+--------------------------------------------------------------------------
  1 |  1   1                                                  (A332098(1) = 2.)
  2 |  1   3    4    2     0     1     0     1                (A332098(2) = 8.)
  3 |  1   7   18   28    25     0     1     8    0    7    1
  4 |  1  15   64  158   271   317   126    45   17   59   14   2   15  3  0 ...
  5 |  1  31  210  748  1825  3351  4606  3760  398  131  299   0  318  0  8 ...
The first column is all ones (A000012), since {1..m-1} = {} for m = 1.
The second column is 2^n - 1 = A000225 \ {0}, since {1..m-1} = {1} for m = 2.
The third column is 3^n - 2^n - 1 = |A083321(n)| for n > 1.
		

Crossrefs

Programs

  • PARI
    A332096(n,m,r=0)={if(r, (m<2||r<2^(n-1)) && return(r-1); my(E, t=1); while(m^n>=r, E=m--); E=abs(r-(m+!!E)^n); for(a=2,m, if(r=m && return(min(E,r-t)); while(m>=t && E, E=min(self()(n,m-1,r-m^n),E); E && E=min(self()(n,m-=1,r),E)); E, m < n/log(2)+1.5, m^n-sum(x=1,m-1,x^n), self()(n,m-1,m^n))}

Formula

For all n and m, T(n,m) <= A332097(n) = T(n,m*) with m* = A078607(n).
For m <= m* + 1, T(n,m) = m^n - Sum_{0 < x < m} x^n.

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).
Showing 1-2 of 2 results.