A362031 a(1) = 1; for n > 1, a(n) is number of terms in the first n-1 terms of the sequence that have the same number of prime factors, counted with multiplicity, as a(n-1).
1, 1, 2, 1, 3, 2, 3, 4, 1, 4, 2, 5, 6, 3, 7, 8, 1, 5, 9, 4, 5, 10, 6, 7, 11, 12, 2, 13, 14, 8, 3, 15, 9, 10, 11, 16, 1, 6, 12, 4, 13, 17, 18, 5, 19, 20, 6, 14, 15, 16, 2, 21, 17, 22, 18, 7, 23, 24, 3, 25, 19, 26, 20, 8, 9, 21, 22, 23, 27, 10, 24, 4, 25, 26, 27, 11, 28, 12, 13, 29, 30, 14, 28
Offset: 1
Keywords
Examples
a(6) = 2 as the number of prime factors of a(5) = A001222(a(5)) = A001222(3) = 1, and there are two previous terms, a(3) and a(5), that have one prime factor. a(9) = 1 as the number of prime factors of a(8) = A001222(a(8)) = A001222(4) = 2, and there is only one term, a(8), that has two prime factors.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, with a color function representing Omega(a(n-1)), where black = 0, red = 1, orange = 2, ..., magenta = 14.
- Scott R. Shannon, Image of the first 1 million terms.
Programs
-
Mathematica
nn = 120; c[] = 0; j = a[1] = c[0] = 1; m = 0; Do[Set[k, c[m]]; (Set[{a[n], j, m}, {k, k, #}]; c[#]++) &[PrimeOmega[k]], {n, 2, nn}]; Array[a, nn] (* _Michael De Vlieger, Apr 06 2023 *)
-
Python
from sympy import factorint from itertools import islice from collections import Counter def A362031gen(): # generator of terms an, c, d = 1, Counter(), dict() while True: yield an pf = d[an] if an in d else sum(factorint(an).values()) c[pf] += 1 an = c[pf] print(list(islice(A362031gen(), 83))) # Michael S. Branicky, Apr 06 2023
-
Python
from itertools import islice from sympy import primeomega def A362031_gen(): # generator of terms a, b, c = {}, {}, 1 while True: yield c d = b[c] = b.get(c,primeomega(c)) c = a[d] = a.get(d,0)+1 A362031_list = list(islice(A362031_gen(),20)) # Chai Wah Wu, Apr 08 2023
Comments