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.

A338199 a(n) = v(1 + F(4*n - 3)), where F(x) = (3*x + 1)/2^v(3*x + 1), x is any odd natural number, and v(y) is the 2-adic valuation of y.

Original entry on oeis.org

1, 1, 3, 1, 1, 1, 2, 2, 1, 3, 5, 1, 1, 1, 2, 3, 1, 1, 3, 1, 1, 1, 2, 2, 1, 2, 4, 1, 1, 2, 2, 4, 1, 1, 3, 1, 1, 3, 2, 2, 1, 5, 7, 1, 1, 1, 2, 3, 1, 1, 3, 1, 1, 1, 2, 2, 1, 2, 4, 1, 1, 3, 2, 5, 1, 1, 3, 1, 1, 1, 2, 2, 1
Offset: 1

Views

Author

L. Edson Jeffery, Oct 17 2020

Keywords

Comments

This is a fractal sequence: removing all entries a(n) with indices n == 0,1 or 3 (mod 4) and reindexing yields the original sequence (see Thm 1 (iii)). This sequence also contains A001511 (the ruler sequence) as a subsequence (see Thm 1 (i)).
THEOREM 1. For all natural numbers n, the following hold: (i) a(4*n) = A001511(n); (ii) a(2*n-1) = a(12*n-8) = A001511(3*n-2); (iii) a(4*n-2) = a(n).
Proof. Let n be a natural number. For part (i), we have F(4*4*n-3) = (3*(16*n-3)+1)/2^v(3*(16*n-3)+1) = (48*n-8)/2^v(48*n-8) = 6*n-1, hence a(4*n) = v(1 + (6*n-1)) = v(6*n) = v(3*2*n) = v(2*n) = A001511(n); for part (ii), v(1+F(4*(2*n-1)-3)) = v(1+(24*n-20)/2^v(24*n-20)) = v(1+(6*n-5)) = v(6*n-4) and, similarly, v(1 + F(4*(12*n-8)-3)) = v(1+(144*n-104)/2^v(144*n-104)) = v(6*n-4), so a(2*n-1) = a(12*n-8), as claimed, and finally note that v(6*n-4) = v(2*(3*n-2)) = A001511(3*n-2); for part (iii), the claim follows from the fact that F(4*(4*n-2)-3) = (48*n-32)/2^v(48*n-32) = (3*n-2)/2^v(3*n-2) = F(4*n-3). QED

Crossrefs

Programs

  • Mathematica
    v[y_] := IntegerExponent[y, 2];f[x_] := (3*x + 1)/2^v[3*x + 1];Table[v[1 + f[4*k - 3]], {k, 73}]

Formula

From Hugo Leeney, Jul 03 2025: (Start)
a(n-1) = v(1 + F(n)) OR a(n) = v(1+ F(n)) where n>=0.
Proof: a(n) = a(n-1) if F(4n-3) = F(n-1), F(4n-3) = 12n-8/2^v(12n-8) = 3n-2/2^(3n-2) = F(n-1). (End)