login
A376619
a(n) is the least odd number k such that A376615(k) = n, or -1 if no such number exists.
3
3, 21, 345, 10625, 74375, 860625, 84189105, 1599592995, 23993894925
OFFSET
1,1
COMMENTS
Without the restriction to odd numbers the corresponding sequence is 3*2^(n-1) = A007283(n-1).
All the terms above 3 are odd binary Niven numbers (A144302).
a(10) > 10^13, if it exists.
EXAMPLE
n | The n iterations
--+------------------------------------------------------
1 | 3 -> 3/2
2 | 21 -> 7 -> 7/3
3 | 345 -> 69 -> 23 -> 23/4
4 | 10625 -> 2125 -> 425 -> 85 -> 85/4
5 | 74375 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
6 | 860625 -> 95625 -> 10625 -> 2125 -> 425 -> 85 -> 85/4
MATHEMATICA
s[n_] := s[n] = Module[{bw = DigitCount[n, 2, 1]}, If[bw == 1, 0, If[!Divisible[n, bw], 1, 1 + s[n/bw]]]]; seq[len_] := Module[{v = Table[0, {len}], c = 0, k = 3, i}, While[c < len, i = s[k]; If[v[[i]] == 0, c++; v[[i]] = k]; k += 2]; v]; seq[5]
PROG
(PARI) s(n) = {my(w = hammingweight(n)); if(w == 1, 0, if(n % w, 1, 1 + s(n/w))); }
lista(len) = {my(v = vector(len), c = 0, k = 3, i); while(c < len, i = s(k); if(v[i] == 0, c++; v[i] = k); k += 2); v; }
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, Sep 30 2024
STATUS
approved