cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A362031 #31 Apr 09 2023 02:05:27
%S A362031 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,
%T A362031 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,
%U A362031 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
%N 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).
%C A362031 After 1 million terms the most common numbers for the number of prime factors of the terms are 3, 2, 4, and 5. These correspond to the uppermost four lines of the attached image. It is unknown if these stay the most common or are passed by numbers with more prime factor as n gets arbitrarily large.
%C A362031 See A362033 for the indices where a(n) = 1.
%H A362031 Michael De Vlieger, <a href="/A362031/b362031.txt">Table of n, a(n) for n = 1..10000</a>
%H A362031 Michael De Vlieger, <a href="/A362031/a362031_1.png">Log log scatterplot of a(n)</a>, n = 1..2^16, with a color function representing Omega(a(n-1)), where black = 0, red = 1, orange = 2, ..., magenta = 14.
%H A362031 Scott R. Shannon, <a href="/A362031/a362031.png">Image of the first 1 million terms</a>.
%e A362031 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.
%e A362031 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.
%t A362031 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 *)
%o A362031 (Python)
%o A362031 from sympy import factorint
%o A362031 from itertools import islice
%o A362031 from collections import Counter
%o A362031 def A362031gen(): # generator of terms
%o A362031     an, c, d = 1, Counter(), dict()
%o A362031     while True:
%o A362031         yield an
%o A362031         pf = d[an] if an in d else sum(factorint(an).values())
%o A362031         c[pf] += 1
%o A362031         an = c[pf]
%o A362031 print(list(islice(A362031gen(), 83))) # _Michael S. Branicky_, Apr 06 2023
%o A362031 (Python)
%o A362031 from itertools import islice
%o A362031 from sympy import primeomega
%o A362031 def A362031_gen(): # generator of terms
%o A362031     a, b, c = {}, {}, 1
%o A362031     while True:
%o A362031         yield c
%o A362031         d = b[c] = b.get(c,primeomega(c))
%o A362031         c = a[d] = a.get(d,0)+1
%o A362031 A362031_list = list(islice(A362031_gen(),20)) # _Chai Wah Wu_, Apr 08 2023
%Y A362031 Cf. A362033, A001222, A354606, A000005, A124056, A342585.
%K A362031 nonn
%O A362031 1,3
%A A362031 _Scott R. Shannon_, Apr 06 2023