OFFSET
1,2
COMMENTS
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.
LINKS
Y. Sagher, Counting the rationals, Amer. Math. Monthly, 96 (1989), p. 823.
EXAMPLE
The first few rationals and their images are 1/1 -> 1, 1/2 -> 2, 2/1 -> 4, 1/3 -> 3, 3/2 -> 18, 2/3 -> 12, 3/1 -> 9, 1/4 -> 8, ...
MATHEMATICA
nmax = 58; s[0] = 0; s[1] = 1; s[n_?EvenQ] := s[n/2]; s[n_] := s[(n-1)/2] + s[(n+1)/2]; v = Table[ FactorInteger /@ {s[n] , s[n+1]}, {n, 1, nmax}]; a[n_] := Times @@ (#[[1]]^(2*#[[2]])&) /@ v[[n, 1]]*Times @@ (#[[1]]^(2*#[[2]]-1)&) /@ v[[n, 2]]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Nov 25 2011, after Pari *)
PROG
(PARI) s(n)=if(n<2, n>0, if(n%2, s((n+1)/2)+s((n-1)/2), s(n/2))) /* A002487(n) */
(PARI) a(n)=local(v); if(n, v=factor(s(n)/s(n+1))~; prod(k=1, length(v), v[1, k]^if(v[2, k]<0, -1-2*v[2, k], 2*v[2, k])), 0)
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
N. J. A. Sloane, Jun 19 2002
EXTENSIONS
More terms from Michael Somos, Jul 19 2002
STATUS
approved