login
A022328
Exponent of 2 (value of i) in n-th number of form 2^i*3^j, i >= 0, j >= 0 (see A003586).
23
0, 1, 0, 2, 1, 3, 0, 2, 4, 1, 3, 0, 5, 2, 4, 1, 6, 3, 0, 5, 2, 7, 4, 1, 6, 3, 0, 8, 5, 2, 7, 4, 1, 9, 6, 3, 0, 8, 5, 2, 10, 7, 4, 1, 9, 6, 3, 11, 0, 8, 5, 2, 10, 7, 4, 12, 1, 9, 6, 3, 11, 0, 8, 5, 13, 2, 10, 7, 4, 12, 1, 9, 6, 14, 3, 11, 0, 8, 5, 13, 2, 10, 7, 15, 4, 12, 1, 9, 6, 14, 3, 11, 0, 8, 16, 5, 13, 2
OFFSET
1,4
COMMENTS
From Clark Kimberling, Mar 18 2015 and May 21 2015: (Start)
This is the signature sequence of log(3)/log(2) and is a fractal sequence; e.g., if the first occurrence of each n is removed, the resulting sequence is the original sequence.
Moreover, if the sequence is partitioned into segments starting with 0 as follows:
0,1
0,2,1,3
0,2,4,1,3
0,5,2,4,1,6,3,
and so on, then deleting the greatest number in each segment leaves
0
0,2,1
0,2,1,3
0,5,2,4,1,3,
and so on, which, concatenated to (0,0,2,1,0,2,1,3,0,5,2,4,1,3,...), is another fractal sequence, in today's usual meaning of that term. When introduced in 1995, one of the defining properties of a fractal sequence was, essentially, that before each n appears, every k < n must have already appeared; this requirement ensures that the sequence yields a dispersion; e.g., A114577 yields A114537. However, the usual meaning of "fractal sequence" nowadays is simply "a sequence that contains itself as a proper subsequence". It is proposed here that the original version be renamed "strongly fractal". Thus, the operations called upper trimming and lower trimming (e.g., A084531, A167237), when applied to strongly fractal sequences, yield strongly fractal sequences. The operation introduced here, which can be called "segment-upper trimming", carries fractal sequences to fractal sequences, but not strongly fractal to strongly fractal.
Associated with the signature sequence S of each positive irrational number is an interspersion (or equivalently, a dispersion), in which row n >= 0 consists of the positions of n in S. The interspersion associated with the signature sequence of log(3)/log(2) is A255975.
(End)
Comment from Allan C. Wechsler, May 26 2024 (Start):
More generally, the "signature sequence" of an irrational number H can be defined as follows. Consider all the numbers of the form a + bH, where a and b are positive integers, and sort them into increasing order (there are no cluster points or other obstacles). The sequence of a-values is then the *signature sequence of H.
If the coefficients a and b are allowed to be 0, you get the same sequence but with all the entries decremented by 1.
(End)
a(n) = A069352(n) - A022329(n). - Reinhard Zumkeller, May 16 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (first 1000 terms from Franklin T. Adams-Watters)
Clark Kimberling, Numeration systems and fractal sequences, Acta Arithmetica 73 (1995) 103-117.
FORMULA
a(n) = A191475(n) - 1. - Franklin T. Adams-Watters, Mar 19 2009 [Corrected by N. J. A. Sloane, May 26 2024]
A003586(n) = 2^a(n)*3^A022329(n). - N. J. A. Sloane, Mar 19 2009
MATHEMATICA
t = Sort[Flatten[Table[2^i 3^j, {i, 0, 200}, {j, 0, 200}]]];
Table[IntegerExponent[t[[n]], 2], {n, 1, 200}] (* A022338 *)
(* Clark Kimberling, Mar 18 2015 *)
PROG
(Haskell)
import Data.Set (singleton, deleteFindMin, insert)
a022328 n = a022328_list !! (n-1)
(a022328_list, a022329_list) = unzip $ f $ singleton (1, (0, 0)) where
f s = (i, j) :
f (insert (2 * y, (i + 1, j)) $ insert (3 * y, (i, j + 1)) s')
where ((y, (i, j)), s') = deleteFindMin s
-- Reinhard Zumkeller, Nov 19 2015, May 16 2015
(Python)
from sympy import integer_log
def A022328(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x, 3)[0]+1))
return (~(m:=bisection(f, n, n))&m-1).bit_length() # Chai Wah Wu, Sep 15 2024
CROSSREFS
KEYWORD
nonn
STATUS
approved