A353960 a(1)=1. Thereafter, if a(n) has occurred k (>1) times in a(j), 1 <= j <= n then a(n+1) = k*a(n). If a(n) is a first occurrence, a(n+1) = A078709(a(n)).
1, 1, 2, 1, 3, 1, 4, 1, 5, 2, 4, 8, 2, 6, 1, 6, 12, 2, 8, 16, 3, 6, 18, 3, 9, 3, 12, 24, 3, 15, 3, 18, 36, 4, 12, 36, 72, 6, 24, 48, 4, 16, 32, 5, 10, 2, 10, 20, 3, 21, 5, 15, 30, 3, 24, 72, 144, 9, 18, 54, 6, 30, 60, 5, 20, 40, 5, 25, 8, 24, 96, 8, 32, 64, 9, 27, 6, 36, 108, 9
Offset: 1
Keywords
Examples
a(8)=1, the 5th occurrence of 1, so the next term a(9)=5. a(43)=32, a first occurrence, so a(44)=A078709(32)=5. a(33)=36 (consequence of two occurrences of 18), and 36 has not occurred before, so a(34)=A078709(36)=4. C(12)=9 because A125057(12)=6, and there are 3 occurrences of 12 which are consequent to repeat terms (2 terms 6, 4 terms 3, and 3 terms 4). Alternatively, 12 has 5 divisors >1, of which 3 (d=2,3,4) satisfy d <= C(12/d), therefore k=3 and C(12) = A125057(12) + 3 = 6 + 3 = 9.
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^20.
Programs
-
Mathematica
Block[{a, c, k, s, nn}, nn = 120; c[] = 0; s = {1}; Table[(Set[a[i], #]; c[#]++) &@ s[[i]], {i, Length[s]}]; Do[If[c[#] == 1, Set[k, Floor[#/DivisorSigma[0, #]]], Set[k, c[#] #]] &@ a[i - 1]; a[i] = k; c[k]++, {i, Length[s] + 1, nn}]; Array[a, nn] ] (* _Michael De Vlieger, May 14 2022 *)
-
PARI
f(n) = n\numdiv(n); \\ A078709 lista(nn) = {my(v=vector(nn), k); v[1] = 1; for (n=2, nn, if ((k=#select(x->(x==v[n-1]), Vec(v, n-1))) > 1, v[n] = k*v[n-1], v[n] = f(v[n-1]));); v;} \\ Michel Marcus, May 16 2022
-
Python
from itertools import islice from sympy import divisor_count def A353960_gen(): # generator of terms adict, a = {}, 1 yield a while True: if a in adict: adict[a] += 1 a *= adict[a] else: adict[a] = 1 a //= divisor_count(a) yield a A353960_list = list(islice(A353960_gen(),30)) # Chai Wah Wu, Jun 04 2022
Extensions
More terms from Michel Marcus, May 16 2022
Comments