%I #66 Sep 08 2022 08:46:20
%S 1,2,5,5,25,35,27,185,264,737,1104,3185,5268,15515,29727,55760,35227,
%T 235277,441474,272525,1861165,3478865,6231072,1899170,5672261,
%U 50533340,17325481,186108950,21328108,63792575,1264831924,3794064335,7086578553
%N a(1) = 1; a(n) = (2^n - 1)*((3^n - 1)/(2^n - 1) mod 1), n >= 2. Unreduced numerators of fractional parts of (3^n - 1)/(2^n - 1).
%C 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.
%C A back-of-the-envelope proof sketch of Waring's Problem.
%C 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.
%C 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.
%C 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."
%C 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.
%C Inspection of z[1] shows it is also always True, with and without the anomaly. So, Waring is shown for n >= 1.
%H Muniru A Asiru, <a href="/A297446/b297446.txt">Table of n, a(n) for n = 1..3280</a>
%H Kline-Iwaniuk, <a href="https://mathematica.stackexchange.com/q/162520/973">Is this a closed form?</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Waring%27s_problem">Waring's problem</a>
%F 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.
%F a(n) = z(n).
%F x(n) := (3/2)^n + ( tan^-1 ( cot( Pi * (3/2)^n ) ) ) / Pi - 1/2;
%F y(n) := 3^n - 2^n * x(n);
%F z(n) := x(n) + y(n) - 1.
%F a(n) = A060692(n) - 1. - _Fred Daniel Kline_, Dec 13 2018
%p 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
%t x[n_] := -(1/2) + (3/2)^n + ArcTan[Cot[(3/2)^n Pi]]/Pi;
%t y[n_] := 3^n - 2^n * x[n];
%t z[n_] := x[n] + y[n] - 1;
%t Array[z, {33}]
%t 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 *)
%o (PARI) a(n) = if (n==1, 1, (3^n-1) % (2^n-1)); \\ _Michel Marcus_, Jan 02 2018
%o (Magma) [1] cat [(3^n-1) mod (2^n -1): n in [2..30]]; // _G. C. Greubel_, Dec 16 2018
%o (Sage) [1] + [mod(3^n-1, 2^n-1) for n in (2..30)] # _G. C. Greubel_, Dec 16 2018
%o (GAP) Concatenation([1],List([2..35],n->(3^n-1) mod (2^n-1))); # _Muniru A Asiru_, Dec 19 2018
%Y Cf. A000225, A002379, A002380, A060692.
%K nonn
%O 1,2
%A _Fred Daniel Kline_, Dec 30 2017
|