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.

A162173 Absolute difference of numerator and denominator of Bernoulli(2*n), n >= 0.

Original entry on oeis.org

0, 5, 31, 41, 31, 61, 3421, 1, 4127, 43069, 174941, 854375, 236366821, 8553097, 23749461899, 8615841261683, 7709321041727, 2577687858361, 26315271553055396563, 2929993913841553, 261082718496449135581
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jun 27 2009

Keywords

Examples

			a(0) = abs(1 - 1) = 0.
a(1) = abs(1 - 6) = 5.
a(2) = abs(-1 - 30) = 31.
		

Crossrefs

Programs

  • GAP
    List([0..30],n->AbsInt(NumeratorRat(Bernoulli(2*n))-DenominatorRat(Bernoulli(2*n))));  # Muniru A Asiru, Nov 25 2018
  • Maple
    A000367 := proc(n) numer(bernoulli(2*n)) ; end: A002445 := proc(n) denom(bernoulli(2*n)) ; end: A162173 := proc(n) abs( A000367(n)-A002445(n)) ; end: seq(A162173(n),n=0..40) ; # R. J. Mathar, Sep 13 2009
  • Mathematica
    a[n_] := Abs[Numerator[BernoulliB[2n]] - Denominator[BernoulliB[2n]]]; Array[a, 20, 0] (* Amiram Eldar, Nov 25 2018 *)
    Abs[Denominator[#]-Numerator[#]]&/@BernoulliB[2 Range[0,20]] (* Harvey P. Dale, Jun 18 2022 *)
  • PARI
    a(n) = my(b=bernfrac(2*n)); abs(numerator(b)-denominator(b)); \\ Michel Marcus, Nov 25 2018
    

Formula

a(n) = abs(A000367(n) - A002445(n)).

Extensions

a(13) corrected by Paul Curtz, Sep 07 2009
a(15) and a(16) corrected by R. J. Mathar, Sep 13 2009
Offset 0 from Amiram Eldar, Nov 25 2018