A300330 a(n) is the product over all prime powers p^e where p^e is the highest power of p dividing n and p-1 does not divide n.
1, 1, 3, 1, 5, 1, 7, 1, 9, 5, 11, 1, 13, 7, 15, 1, 17, 1, 19, 1, 21, 11, 23, 1, 25, 13, 27, 7, 29, 5, 31, 1, 33, 17, 35, 1, 37, 19, 39, 1, 41, 1, 43, 11, 45, 23, 47, 1, 49, 25, 51, 13, 53, 1, 55, 7, 57, 29, 59, 1, 61, 31, 63, 1, 65, 11, 67, 17, 69, 35, 71, 1
Offset: 1
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Programs
-
Julia
using Nemo function A300330(n) P = 1 for (p, e) in factor(ZZ(n)) ! divisible(ZZ(n), p - 1) && (P *= p^e) end P end [A300330(n) for n in 1:72] |> println
-
Magma
[n/(Denominator(Bernoulli(n)/n)/Denominator(Bernoulli(n))): n in [1..100]]; // Vincenzo Librandi, Mar 12 2018
-
Maple
A300330 := proc(n) local P, F, f, divides; divides := (a,b) -> is(irem(b,a) = 0): P := 1; F := ifactors(n)[2]; for f in F do if not divides(f[1]-1, n) then P := P*f[1]^f[2] fi od; P end: seq(A300330(n), n=1..100);
-
Mathematica
a[n_]:=If[OddQ[n], 1, Denominator[BernoulliB[n]/n]/Denominator[BernoulliB[n]]]; Table[n/a[n], {n, 1, 100}] (* Vincenzo Librandi, Mar 12 2018 *)
Formula
a(n) * A193267(n) = n.