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.

A297446 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).

Original entry on oeis.org

1, 2, 5, 5, 25, 35, 27, 185, 264, 737, 1104, 3185, 5268, 15515, 29727, 55760, 35227, 235277, 441474, 272525, 1861165, 3478865, 6231072, 1899170, 5672261, 50533340, 17325481, 186108950, 21328108, 63792575, 1264831924, 3794064335, 7086578553
Offset: 1

Views

Author

Fred Daniel Kline, Dec 30 2017

Keywords

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.

Crossrefs

Programs

  • GAP
    Concatenation([1],List([2..35],n->(3^n-1) mod (2^n-1))); # Muniru A Asiru, Dec 19 2018
    
  • Magma
    [1] cat [(3^n-1) mod (2^n -1): n in [2..30]]; // G. C. Greubel, Dec 16 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 *)
  • PARI
    a(n) = if (n==1, 1, (3^n-1) % (2^n-1)); \\ Michel Marcus, Jan 02 2018
    
  • Python
    def A297446(n): return pow(3,n,(1<2 else n # Chai Wah Wu, Jun 25 2024
  • Sage
    [1] + [mod(3^n-1, 2^n-1) for n in (2..30)] # G. C. Greubel, Dec 16 2018
    

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