A235146 a(n) = Least integer k such that it takes n iterations of "factor and reverse bits of odd prime divisors" (A235027) before a fixed point or cycle of 2 is reached; records in A235145.
0, 19, 139, 719, 4793, 23773, 260863, 2375231, 21793843
Offset: 0
Programs
-
PARI
revbits(n) = fromdigits(Vecrev(binary(n)), 2); a235027(n) = {f = factor(n); for (k=1, #f~, if (f[k,1] != 2, f[k,1] = revbits(f[k,1]););); factorback(f);} find(v, newn) = {for(k=1, #v, if (v[#v -k + 1] == newn, return (k));); return (0);} a235145(n) = {ok = 0; v = [n]; while (! ok, newn = a235027(n); ind = find(v, newn); if (ind, ok = 1, v = concat(v, newn); n = newn);); #v - ind;} a(n) = {k = 0; while (a235145(k) != n, k = nextprime(k+1)); k;} lista(nn) = {kprec = 0; for (n=0, nn, k = kprec; while (a235145(k) != n, k = nextprime(k+1)); print1(k, ", "); kprec = k;);} \\ Michel Marcus, Aug 06 2017
Extensions
a(5)-a(8) from Michel Marcus, Aug 06 2017
Comments