Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
The number 1 alternating with the numbers A006953/A002445 (which are integers).
5

%I #36 Sep 08 2022 08:45:58

%S 1,2,1,4,1,6,1,8,1,2,1,12,1,2,1,16,1,18,1,20,1,2,1,24,1,2,1,4,1,6,1,

%T 32,1,2,1,36,1,2,1,40,1,42,1,4,1,2,1,48,1,2,1,4,1,54,1,8,1,2,1,60,1,2,

%U 1,64,1,6,1,4,1,2,1,72,1,2,1,4,1,6,1,80,1,2,1,84,1,2,1,8,1,18,1,4,1,2,1,96,1,2,1,100

%N The number 1 alternating with the numbers A006953/A002445 (which are integers).

%C 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 divides n. - _Peter Luschny_, Mar 12 2018

%H Vincenzo Librandi, <a href="/A193267/b193267.txt">Table of n, a(n) for n = 1..2000</a>

%F a(n+1) = A185633(n+1)/A027760(n+1).

%F a(n+1) = c(n+2)/c(n+1).

%p with(numtheory); a := proc(n) divisors(n); map(i->i+1, %); select(isprime, %);

%p mul(k^padic[ordp](n,k),k=%) end: seq(a(n), n=1..100); # _Peter Luschny_, Mar 12 2018

%p # Alternatively:

%p A193267 := proc(n) local P, F, f, divides; divides := (a,b) -> is(irem(b,a) = 0):

%p P := 1; F := ifactors(n)[2]; for f in F do if divides(f[1]-1, n) then

%p P := P*f[1]^f[2] fi od; P end: seq(A193267(n), n=1..100); # _Peter Luschny_, Mar 12 2018

%t a[n_] := If[OddQ[n], 1, Denominator[ BernoulliB[n]/n ] / Denominator[ BernoulliB[n]] ]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Dec 21 2012 *)

%o (Magma) [Denominator(Bernoulli(n)/n)/Denominator(Bernoulli(n)): n in [1..100]]; // _Vincenzo Librandi_, Mar 12 2018

%o (Julia)

%o using Nemo

%o function A193267(n) P = 1

%o for (p, e) in factor(ZZ(n))

%o divisible(ZZ(n), p - 1) && (P *= p^e) end

%o P end

%o [A193267(n) for n in 1:100] |> println # _Peter Luschny_, Mar 12 2018

%K nonn

%O 1,2

%A _Paul Curtz_, Dec 20 2012