cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Paul Curtz, Dec 20 2012

Keywords

Comments

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

Programs

  • Julia
    using Nemo
    function A193267(n) P = 1
        for (p, e) in factor(ZZ(n))
            divisible(ZZ(n), p - 1) && (P *= p^e) end
    P end
    [A193267(n) for n in 1:100] |> println # Peter Luschny, Mar 12 2018
  • Magma
    [Denominator(Bernoulli(n)/n)/Denominator(Bernoulli(n)): n in [1..100]]; // Vincenzo Librandi, Mar 12 2018
    
  • Maple
    with(numtheory); a := proc(n) divisors(n); map(i->i+1, %); select(isprime, %);
    mul(k^padic[ordp](n,k),k=%) end: seq(a(n), n=1..100); # Peter Luschny, Mar 12 2018
    # Alternatively:
    A193267 := 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 divides(f[1]-1, n) then
    P := P*f[1]^f[2] fi od; P end: seq(A193267(n), n=1..100); # Peter Luschny, Mar 12 2018
  • Mathematica
    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 *)

Formula

a(n+1) = A185633(n+1)/A027760(n+1).
a(n+1) = c(n+2)/c(n+1).