OFFSET
0,3
COMMENTS
A variant of the inventory sequence, A342585.
The graph exhibits sharp jumps followed by a rapid decline forming a periodic hockey stick pattern. Larger-scale, near-linear structures also appear.
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.
Open question: will all positive integers appear in the sequence?
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000 (first 4330 terms from Damon Lay)
EXAMPLE
As an irregular triangle, the table begins:
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, 8, 2, 2, 1, 1, 1, 1, 1, 2;
...
Initialize the sequence with '1'.
Powers of 1 are counted in the first column, powers of 2 in the second, powers of 3 in the third, etc.
PROG
(Python)
from collections import Counter
from sympy import divisors, perfect_power
def powers_in(n):
t = perfect_power(n) # False for n == 1
return [n] if not t else [t[0]**d for d in divisors(t[1])]
def aupton(nn):
num, alst, inventory = 1, [1], Counter([1])
while len(alst) <= nn:
c = inventory[num]
if c == 0: num = 1
else: num += 1; alst.append(c); inventory.update(powers_in(c))
return alst
print(aupton(100)) # Michael S. Branicky, May 05 2023
CROSSREFS
KEYWORD
easy,nonn,tabf
AUTHOR
Damon Lay, Apr 17 2023
STATUS
approved