login
Inventory of powers. Initialize the sequence with '1'. Then record the number of powers of 1 thus far, then do the same for powers of 2 (2, 4, 8, ...), powers of 3, etc. When the count is zero, do not record a zero; rather start the inventory again with the powers of 1.
1

%I #42 May 06 2023 06:58:09

%S 1,1,2,1,3,1,1,5,1,1,7,1,1,9,1,2,10,2,2,10,4,2,1,1,12,6,2,1,1,1,1,16,

%T 8,2,2,1,1,1,1,1,2,21,12,2,2,1,1,1,1,1,2,26,15,2,2,1,1,1,1,1,2,31,18,

%U 2,2,1,1,1,1,1,2,36,21,2,2,1,2,1,1,1

%N Inventory of powers. Initialize the sequence with '1'. Then record the number of powers of 1 thus far, then do the same for powers of 2 (2, 4, 8, ...), powers of 3, etc. When the count is zero, do not record a zero; rather start the inventory again with the powers of 1.

%C A variant of the inventory sequence, A342585.

%C The graph exhibits sharp jumps followed by a rapid decline forming a periodic hockey stick pattern. Larger-scale, near-linear structures also appear.

%C Periodic patterns in the relative frequency of any given number also are present. For example, perform a rolling count of the number of times 2 appears in the previous 40 entries.

%C Open question: will all positive integers appear in the sequence?

%H Michael S. Branicky, <a href="/A362372/b362372.txt">Table of n, a(n) for n = 0..10000</a> (first 4330 terms from Damon Lay)

%e As an irregular triangle, the table begins:

%e 1;

%e 1;

%e 2, 1;

%e 3, 1, 1;

%e 5, 1, 1;

%e 7, 1, 1;

%e 9, 1, 2;

%e 10, 2, 2;

%e 10, 4, 2, 1, 1;

%e 12, 6, 2, 1, 1, 1, 1;

%e 16, 8, 2, 2, 1, 1, 1, 1, 1, 2;

%e ...

%e Initialize the sequence with '1'.

%e Powers of 1 are counted in the first column, powers of 2 in the second, powers of 3 in the third, etc.

%o (Python)

%o from collections import Counter

%o from sympy import divisors, perfect_power

%o def powers_in(n):

%o t = perfect_power(n) # False for n == 1

%o return [n] if not t else [t[0]**d for d in divisors(t[1])]

%o def aupton(nn):

%o num, alst, inventory = 1, [1], Counter([1])

%o while len(alst) <= nn:

%o c = inventory[num]

%o if c == 0: num = 1

%o else: num += 1; alst.append(c); inventory.update(powers_in(c))

%o return alst

%o print(aupton(100)) # _Michael S. Branicky_, May 05 2023

%Y Cf. A342585 and similar variants thereof: A345730, A347791, A348218, A352799, A353092.

%K easy,nonn,tabf

%O 0,3

%A _Damon Lay_, Apr 17 2023