OFFSET
1,1
LINKS
R. Coleman, Some remarks on Euler's totient function, HAL Id: hal-00718975, version 1, 2012.
H. Gupta, Euler's totient function and its inverse, Indian J. Pure Appl. Math., 12(1) (1981), 22-29.
FORMULA
Numerator of n*Product_{p prime, (p-1)|n} p/(p-1).
EXAMPLE
For n = 12, there are 5 primes p with (p-1)|12: p1 = 2, p2 = 3, p3 = 5, p4 = 7, and p5 = 13. The numerator of 12*(2/1)*(3/2)*(5/4)*(7/6)*(13/12) = 455/8 is a(12) = 455.
MAPLE
with(numtheory): A316785 := proc(n) local d, N; N:=n; for d in divisors(n) do if is prime(d+1) then N := (N*(d+1))/(d) end if; end do; numer(N); end proc;
MATHEMATICA
a[n_] := Block[{p = Select[Prime@ Range@ PrimePi[n + 1], Mod[n, # - 1] == 0 &]}, Numerator[n*Times @@ (p/(p - 1))]]; Array[a, 60] (* Robert G. Wilson v, Aug 01 2018 *)
PROG
(PARI) a(n) = my(p=n); fordiv(n, d, if (isprime(d+1), p *= (d+1)/d)); numerator(p); \\ Michel Marcus, Jul 29 2018
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Franz Vrabec, Jul 13 2018
STATUS
approved