A297026 Positions of records in A297025.
0, 1, 2, 3, 5, 7, 11, 22, 23, 46, 47, 94, 167, 283, 359, 718, 719, 1438, 1439, 2878, 2879, 5758, 11516, 23032, 34549, 69098, 138059, 138197, 276394, 552788, 1105576, 2211152, 3316619, 6633238, 11792393, 23584786, 23584787, 47169574, 53065907, 106131814, 212263628, 424527256
Offset: 1
Keywords
Programs
-
Mathematica
With[{s = Array[Length@ NestWhileList[If[#1 == 1, 0, If[Total[#2[[All, -1]] ] == 1, #1 - 1, #1/#2[[1, 1]] ]] & @@ {#, FactorInteger@ #} &, #, # > 0 &] - 1 &, 2^18, 0] }, FirstPosition[s, #][[1]] - 1 & /@ Union@ FoldList[Max, s]] (* Michael De Vlieger, Dec 24 2017, after Robert G. Wilson v at A297025 *)
-
PARI
f(n) = if (n==1, 0, isprime(n), n-1, my(d=divisors(n)); d[#d-1]); nb(n) = my(nb = 0); while (n, n = f(n); nb++); nb; lista(nn) = {my(rec = - 1); for (n=0, nn, if ((m=nb(n)) > rec, rec = m; print1(n, ", ")););} \\ Michel Marcus, Dec 24 2017
-
PARI
first(n) = {n = max(n, 2); my(res = vector(n), i = 3, c = 2, m = 1); res[1] = 0; res[2] = 1; while(i <= n, forprime(p = res[i-1] + 1, 2*res[i-1], c = A297025(p); if(c > m, m = c; res[i] = p; i++; next(2))); if(res[i] == 0, res[i] = 2 * res[i-1]; i++; m++)); res} A220096(n) = if(n == 1, return(0)); my(f = factor(n)); if(vecsum(f[,2])==1, n-1, n / f[1,1]) A297025(n) = my(t); while(n, t++; n = A220096(n)); t \\ David A. Corneth, Dec 24 2017
Extensions
a(29)-a(33) from Michel Marcus, Dec 24 2017
More terms from David A. Corneth, Dec 24 2017
Comments