A354606 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 divisors as a(n-1).
1, 1, 2, 1, 3, 2, 3, 4, 1, 4, 2, 5, 6, 1, 5, 7, 8, 2, 9, 3, 10, 3, 11, 12, 1, 6, 4, 4, 5, 13, 14, 5, 15, 6, 7, 16, 1, 7, 17, 18, 2, 19, 20, 3, 21, 8, 9, 6, 10, 11, 22, 12, 4, 7, 23, 24, 1, 8, 13, 25, 8, 14, 15, 16, 2, 26, 17, 27, 18, 5, 28, 6, 19, 29, 30, 2, 31, 32, 7, 33, 20, 8, 21, 22, 23, 34
Offset: 1
Examples
a(6) = 2 as a(5) = 3 which has two divisors, and the total number of terms in the first five terms with two divisors is two, namely a(3) = 2 and a(5) = 3.
Links
- Scott R. Shannon, Table of n, a(n) for n = 1..10000
- Scott R. Shannon, Image of the first 250000 terms. The green line is y = n.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
Programs
-
Mathematica
nn = 120; c[] := 0; a[1] = j = 1; Do[k = ++c[DivisorSigma[0, j]]; Set[{a[n], j}, {k, k}], {n, 2, nn}]; Array[a, nn] (* _Michael De Vlieger, Dec 12 2024 *)
-
Python
from sympy import divisor_count from collections import Counter def f(n): return divisor_count(n) def aupton(nn): an, fan, alst, inventory = 1, 1, [1], Counter([1]) for n in range(2, nn+1): an = inventory[fan] fan = f(an) alst.append(an) inventory.update([fan]) return alst print(aupton(86)) # Michael S. Branicky, Jul 09 2022
Comments