Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #23 Jan 28 2022 20:28:08
%S 0,2,6,22,27,110,175,502,894,2037,3775,8182,24558,49142,98286,196598,
%T 655323,524278,2088950,2097142,6291438,16515062,15728575,62914175,
%U 100663278,134217718,528482294,939524086,2145386486,3221225454,11811159998,8589934582,47244640246
%N a(n) is the smallest number k for which A000120(k) = A000120(k') = n, or -1 if no such k exists, where k' is the arithmetic derivative of k (A003415).
%C Conjecture. a(n) >= 0 for all n.
%e 0' = 0, A000120(0) = A000120(0') = 0, so a(0) = 0.
%e 1' = 0, A000120(1) = 1, A000120(1') = 0. 2 = 10_2, 2' = 1 = 1_0, so A000120(2) = A000120(2') = 1 and a(1) = 2.
%t bw[n_] := DigitCount[n, 2, 1]; d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); seq[m_, nmax_] := Module[{s = Table[-1, {m + 1}], c = 0, n = 0, i}, While[c < m + 1 && n < nmax, i = bw[n] + 1; If[i <= m && s[[i]] < 0, If[bw[d[n]] + 1 == i, c++; s[[i]] = n]]; n++]; TakeWhile[s, # > -1 &]]; seq[16, 10^6] (* _Amiram Eldar_, Jan 27 2022 *)
%o (Magma) f:=func<n |n le 1 select 0 else n*(&+[Factorisation(n)[i][2] / Factorisation(n)[i][1]: i in [1..#Factorisation(n)]])>; a:=[]; for n in [0..22] do k:=2^n-1 ; while &+Intseq(k,2) ne n or &+Intseq( Floor(f(k)),2) ne n do k:=k+1; end while; Append(~a,k*1); end for; a;
%o (PARI) d(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
%o a(n) = my(k=2^n-1); while ((hammingweight(k) != n) || (hammingweight(d(k)) != n), k++); k; \\ _Michel Marcus_, Jan 25 2022
%Y Cf. A000120, A003415, A350552.
%K nonn,base
%O 0,2
%A _Marius A. Burtea_, Jan 24 2022
%E a(30)-a(32) from _Jinyuan Wang_, Jan 27 2022