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.
%I A297026 #19 Jan 19 2018 03:06:01 %S A297026 0,1,2,3,5,7,11,22,23,46,47,94,167,283,359,718,719,1438,1439,2878, %T A297026 2879,5758,11516,23032,34549,69098,138059,138197,276394,552788, %U A297026 1105576,2211152,3316619,6633238,11792393,23584786,23584787,47169574,53065907,106131814,212263628,424527256 %N A297026 Positions of records in A297025. %C A297026 From _David A. Corneth_, Dec 24 2017: (Start) %C A297026 If n > 2 then a(n) <= 2 * a(n - 1). Proof: 2 * a(n - 1) is even. After one iteration of A220096, we get a(n - 1), which gives a record. %C A297026 If n > 3 and a(n) < 2 * a(n - 1) then a(n) is odd. Proof: if a(n) is even then a(n) / 2 < a(n - 1) is in the sequence. We have k = A297025(a(n - 1)) and k + 1 = A297025(2 * a(n - 1)) hence a(n) can't be the position of a record as a(n - 1) < a(n) < 2 * a(n-1). %C A297026 If n > 2 and a(n) < 2 * a(n - 1) then a(n) is prime. Proof: This is true for n = 3. For n > 3, a(n) is odd. If a(n) is composite then it has a smallest odd prime factor p >= 3. We have A297025(a(n) / p) < A297025(a(n - 1)) < A297025(a(n)) which is impossible hence in this case, a(n) is prime. (End) %t A297026 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 *) %o A297026 (PARI) f(n) = if (n==1, 0, isprime(n), n-1, my(d=divisors(n)); d[#d-1]); %o A297026 nb(n) = my(nb = 0); while (n, n = f(n); nb++); nb; %o A297026 lista(nn) = {my(rec = - 1); for (n=0, nn, if ((m=nb(n)) > rec, rec = m; print1(n, ", ")););} \\ _Michel Marcus_, Dec 24 2017 %o A297026 (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} %o A297026 A220096(n) = if(n == 1, return(0)); my(f = factor(n)); if(vecsum(f[,2])==1, n-1, n / f[1,1]) %o A297026 A297025(n) = my(t); while(n, t++; n = A220096(n)); t \\ _David A. Corneth_, Dec 24 2017 %Y A297026 Cf. A220096, A297025. %K A297026 nonn %O A297026 1,3 %A A297026 _Peter Kagey_, Dec 24 2017 %E A297026 a(29)-a(33) from _Michel Marcus_, Dec 24 2017 %E A297026 More terms from _David A. Corneth_, Dec 24 2017