%I #30 Sep 05 2023 01:43:00
%S 1,2,3,4,5,6,7,1,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,3,25,26,
%T 1,28,29,30,31,1,33,34,35,36,37,38,39,5,41,42,43,44,45,46,47,48,49,50,
%U 51,52,53,2,55,7,57,58,59,60,61,62,63,1,65,66,67,68,69,70,71,9,73,74,75,76,77,78,79,80,81
%N Numerator of the rational number obtained when exponents in prime factorization of n are reinterpreted as alternating binary sums (A065620).
%C Map n -> A270418(n)/A270419(n) is a bijection from N (1, 2, 3, ...) to the set of positive rationals.
%H Antti Karttunen, <a href="/A270418/b270418.txt">Table of n, a(n) for n = 1..12167</a>
%F Multiplicative with a(p^e) = p^A065620(e) for odious e, a(p^e)=1 for evil e, or equally, a(p^e) = p^(A010060(e)*A065620(e)).
%F a(1) = 1, for n > 1, a(n) = a(A028234(n)) * A020639(n)^( A010060(A067029(n)) * A065620(A067029(n)) ).
%F Other identities. For all n >= 1:
%F a(A270436(n)) = n, a(A270437(n)) = 1.
%t s[0] = 0; s[n_]:= s[n]= If[OddQ[n], 1 - 2*s[(n-1)/2], 2*s[n/2]]; f[p_, e_] := p^(ThueMorse[e] * s[e]); a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Sep 05 2023 *)
%o (Scheme, two variants)
%o (definec (A270418 n) (cond ((= 1 n) 1) (else (* (expt (A020639 n) (* (A010060 (A067029 n)) (A065620 (A067029 n)))) (A270418 (A028234 n))))))
%o (define (A270418 n) (numerator (A270418perA270419 n)))
%o (definec (A270418perA270419 n) (cond ((= 1 n) 1) (else (* (expt (A020639 n) (A065620 (A067029 n))) (A270418perA270419 (A028234 n))))))
%o (PARI) A270418(n)={n=factor(n);n[,2]=apply(A065620,n[,2]);numerator(factorback(n))} \\ _M. F. Hasler_, Apr 16 2018
%Y Cf. A270419 (gives the denominators).
%Y Cf. A262675 (indices of ones).
%Y Cf. A000069, A001969, A010060, A020639, A028234, A065620, A067029.
%Y Cf. also A270420, A270421, A270436, A270437 and permutation pair A273671/A273672.
%Y Differs from A056192 for the first time at n=32, which here a(32)=1, while A056192(32)=4.
%K nonn,frac,easy,mult
%O 1,2
%A _Antti Karttunen_, May 23 2016