OFFSET
1,2
COMMENTS
An easy way to get the numerator of the fractional part of the proper fraction (3/2)^n is (3^n - 2^n) (mod 2^n), which is not considered an elementary function. So, we created a function that subtracted the denominator from this difference until we got a sign change from positive to negative. I asked if this might be considered elementary at the Kline-Iwaniuk link. Mariusz Iwaniuk noticed the similarity to the sawtooth wave, and crafted a closed form for the floor of (3/2)^n from which we can get the modulus value for the numerator.
A back-of-the-envelope proof sketch of Waring's Problem.
We start with the original Diophantine equation from A060692, which we designate as x(n)+y(n), and substitute it into the "if statement" from Wikipedia Waring's Problem link: "if x(n) + y(n) <= 2^n." This has had no proof because we need more information.
So we extend the expression to three variables, (x,y,z), with z as the numerator of the fractional part of (3^n-1)/(2^n-1), and add the restriction that x is the common floor of (3^n - 1) / (2^n - 1) and 3^n / 2^n.
We find an identity for n >= 2, x(n) + y(n) == z(n) + 1, and substitute it into the if statement: "if x(n) + y(n) == z(n) + 1 <= 2^n."
Since the numerator of the fractional part must be within the bounds, 1 < z < 2^n -1, we determine that the greatest possible value of z is 2^n -2. Substituting for z(n), "if 2^n - 2 + 1 <= 2^n," shows it is always True. And more importantly, the Diophantine equation is always less than 2^n.
Inspection of z[1] shows it is also always True, with and without the anomaly. So, Waring is shown for n >= 1.
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..3280
Fred Daniel Kline and Mariusz Iwaniuk, Is this a closed form?, Mathematica StackExchange, 2017.
Wikipedia, Waring's problem
FORMULA
a(1) = 1; a(n) = (2^n - 1)*((3^n - 1)/(2^n - 1) mod 1), n >= 2, is the conventional way to describe the sequence. z(n) is the closed form which includes the anomaly.
a(n) = z(n).
x(n) := (3/2)^n + ( tan^-1 ( cot( Pi * (3/2)^n ) ) ) / Pi - 1/2;
y(n) := 3^n - 2^n * x(n);
z(n) := x(n) + y(n) - 1.
a(n) = A060692(n) - 1. - Fred Daniel Kline, Dec 13 2018
MAPLE
a:=n->`if`(n=1, 1, modp(3^n-1, 2^n-1)): seq(a(n), n=1..35); # Muniru A Asiru, Dec 19 2018
MATHEMATICA
x[n_] := -(1/2) + (3/2)^n + ArcTan[Cot[(3/2)^n Pi]]/Pi;
y[n_] := 3^n - 2^n * x[n];
z[n_] := x[n] + y[n] - 1;
Array[z, {33}]
f[n_] := PowerMod[3, n, 2^n -1] -1; f[1] = 1; f[2] = 2; Array[f, 33] (* Robert G. Wilson v, Jan 05 2018 *)
PROG
(PARI) a(n) = if (n==1, 1, (3^n-1) % (2^n-1)); \\ Michel Marcus, Jan 02 2018
(Magma) [1] cat [(3^n-1) mod (2^n -1): n in [2..30]]; // G. C. Greubel, Dec 16 2018
(Sage) [1] + [mod(3^n-1, 2^n-1) for n in (2..30)] # G. C. Greubel, Dec 16 2018
(GAP) Concatenation([1], List([2..35], n->(3^n-1) mod (2^n-1))); # Muniru A Asiru, Dec 19 2018
(Python)
def A297446(n): return pow(3, n, (1<<n)-1)-1 if n>2 else n # Chai Wah Wu, Jun 25 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Fred Daniel Kline, Dec 30 2017
STATUS
approved