login
Numerator of rational number i/j such that Sagher map sends i/j to n.
11

%I #49 Aug 26 2024 11:42:04

%S 1,1,1,2,1,1,1,1,3,1,1,2,1,1,1,4,1,3,1,2,1,1,1,1,5,1,1,2,1,1,1,1,1,1,

%T 1,6,1,1,1,1,1,1,1,2,3,1,1,4,7,5,1,2,1,1,1,1,1,1,1,2,1,1,3,8,1,1,1,2,

%U 1,1,1,3,1,1,5,2,1,1,1,4,9,1,1,2,1,1,1,1,1,3,1,2,1,1,1,1,1,7,3,10,1,1,1,1

%N Numerator of rational number i/j such that Sagher map sends i/j to n.

%C The Sagher map sends Product p_i^e_i / Product q_i^f_i (p_i and q_i being distinct primes) to Product p_i^(2e_i) * Product q_i^(2f_i-1). This is multiplicative.

%H Reinhard Zumkeller, <a href="/A071974/b071974.txt">Table of n, a(n) for n = 1..10000</a>

%H David M. Bradley, <a href="http://arxiv.org/abs/math/0509025">Counting the Positive Rationals: A Brief Survey</a>, arXiv:math/0509025 [math.HO], 2005.

%H Gerald Freilich, <a href="http://www.jstor.org/stable/2313350">A denumerability formula for the rationals</a>, Amer. Math. Monthly, Nov 1965, pp. 1013-1014.

%H Kevin McCrimmon, <a href="http://www.jstor.org/stable/2309448">Enumeration of the positive rationals</a>, Amer. Math. Monthly, Nov 1960, p. 868.

%H Yoram Sagher, <a href="http://www.jstor.org/stable/2324846">Counting the rationals</a>, Amer. Math. Monthly, 96 (1989), p. 823. Math. Rev. 90i:04001.

%H <a href="/index/Ra#rational">Index entries for sequences related to enumerating the rationals</a>

%F If n=Product p_i^e_i, then a_n=Product p_i^f(e_i), where f(n)=n/2 if n is even and f(n)=0 if n is odd. - _Reiner Martin_, Jul 08 2002

%F a(n^2) = n, A071975(n^2) = 1, cf. A000290; a(2*(2*n-1)^2) = 2*n+1, A071975(2*(2*n-1)^2) = 2, cf. A077591. - _Reinhard Zumkeller_, Jul 10 2011

%F From _Amiram Eldar_, Nov 02 2023, Jul 26 2024: (Start)

%F a(n) = sqrt(A350388(n)) (square root of largest unitary divisor of n that is a square).

%F Dirichlet g.f.: zeta(2*s) * zeta(2*s-1) * Product_{p prime} (1 + 1/p^s - 1/p^(2*s) - 1/p^(3*s-1)). (End)

%e The Sagher map sends the following fractions to 1, 2, 3, 4, ...: 1/1, 1/2, 1/3, 2/1, 1/5, 1/6, 1/7, 1/4, 3/1, ...

%t f[{p_, a_}] := If[EvenQ[a], p^(a/2), 1]; a[n_] := Times@@(f/@FactorInteger[n])

%t Table[Sqrt@ SelectFirst[Reverse@ Divisors@ n, And[IntegerQ@ Sqrt@ #, CoprimeQ[#, n/#]] &], {n, 104}] (* _Michael De Vlieger_, Dec 06 2018 *)

%o (PARI) a(n)=local(v=factor(n)~); prod(k=1,length(v),if(v[2,k]%2,1,v[1,k]^(v[2,k]/2)))

%o (Haskell)

%o a071974 n = product $ zipWith (^) (a027748_row n) $

%o map (\e -> (1 - e `mod` 2) * e `div` 2) $ a124010_row n

%o -- _Reinhard Zumkeller_, Jun 15 2012

%o (Python)

%o from math import prod

%o from sympy import factorint

%o def A071974(n): return prod(p**(e>>1) for p, e in factorint(n).items() if e&1^1) # _Chai Wah Wu_, Jul 27 2024

%Y Cf. A071975. Differs from A056622 at a(32).

%Y Cf. A000290, A027748, A077591, A124010, A350388.

%Y For other bijective mappings from integers to positive rationals see A002487, A020652/A020653, A038568/A038569, A229994/A077610, A295515.

%K nonn,frac,easy,nice,mult

%O 1,4

%A _N. J. A. Sloane_, Jun 19 2002

%E More terms from _Reiner Martin_, Jul 08 2002

%E Additional references supplied by Kevin Ryde added by _N. J. A. Sloane_, May 31 2012