A334099 The least k for which A329697(k) = n; Position of first occurrence of n (and also records) in A329697.
1, 3, 7, 19, 43, 127, 283, 659, 1319, 3957, 9227, 21599, 50123, 129263, 258527, 775581, 1551163, 4340087, 9750239, 27353747, 65148847, 156067127, 340997113, 955523423
Offset: 0
Crossrefs
Programs
-
Mathematica
With[{s = Array[Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, #, # != 2^IntegerExponent[#, 2] &] - 1 &, 10^6]}, {1}~Join~Array[FirstPosition[s, #][[1]] &, Max@ s]] (* Michael De Vlieger, Apr 30 2020 *)
-
PARI
A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1])))); m=-1; k=0; for(n=1,2^32, t=A329697(n); if(t>m, m=t; write("b334099.txt", k, " ", n); k++));
Formula
For all n >= 0, A329697(a(n)) = n.
Comments