A353092 Inventory sequence counting prime factors. (See comment.)
0, 1, 0, 3, 1, 0, 5, 2, 0, 6, 3, 1, 0, 8, 4, 2, 1, 0, 10, 5, 3, 1, 0, 12, 7, 3, 2, 0, 13, 11, 3, 2, 0, 14, 14, 5, 2, 0, 15, 16, 6, 2, 1, 0, 17, 18, 7, 3, 1, 0, 19, 21, 8, 4, 1, 0, 21, 21, 11, 4, 1, 0, 23, 23, 12, 5, 1, 0, 25, 25, 14, 5, 1, 0, 27, 26, 16, 6, 2
Offset: 0
Keywords
Examples
a(0) = 0 since at first there are no terms, hence 0 terms with 0 prime factors. The count now restarts because a 0 term has occurred. a(1) = 1 because now there is one term (a(0)) which has no prime factor. a(2) = 0 because there is no term with one factor. The count now restarts. a(3) = 3 because all three prior terms have no prime factor. a(4) = 1 since a(3) is prime, the first to occur in the sequence. a(5) = 0 since there are no terms with 2 prime divisors. The count now restarts... As an irregular table the sequence starts: 0; 1, 0; 3, 1, 0; 5, 2, 0; 6, 3, 1, 0; 8, 4, 2, 1, 0; 10, 5, 3, 1, 0;
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..11196 (as an irregular table, rows m = 0..2^10, flattened)
- Michael De Vlieger, Scatterplot of a(n), n = 1..11185 (2^10 zeros), with a color code assigning black to 0, and color-coding trajectories, starting with red and ending with magenta, pertaining to omega(k), 1 <= k <= 15 respectively.
- Michael De Vlieger, Log-log scatterplot of a(n), n = 1..11185 (2^10 zeros), color-coding trajectories, starting with red and ending with magenta, pertaining to omega(k), 1 <= k <= 15 respectively.
- Index entries for sequences related to the inventory sequence
Programs
-
Mathematica
Block[{a, c, j, k, m}, a[1] = c[] = 0; j = c[-1] = c[0] = 1; Do[k = 0; While[c[k] > 0, j++; Set[m, c[k]]; Set[a[j], m]; c[If[m < 2, 0, PrimeOmega[m]]]++; k++]; j++; Set[a[j], 0]; c[0]++, 16]; Array[a, j] ] (* _Michael De Vlieger, Apr 23 2022 *)
-
Python
from sympy import factorint from collections import Counter def f(n): return 0 if n < 2 else sum(e for p, e in factorint(n).items()) def aupton(nn): num, alst, inventory = 0, [0], Counter([0]) for n in range(1, nn+1): c = inventory[num] num = 0 if c == 0 else num + 1 alst.append(c) inventory.update([f(c)]) return alst print(aupton(78)) # Michael S. Branicky, Apr 22 2022
Extensions
a(50) and beyond from Michael S. Branicky, Apr 22 2022
Comments