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.

A228037 Odd-indexed terms of Agoh's congruence A046094: a(n) is conjectured to be 1 iff 2n+1 is prime.

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 1, 5, 1, 1, 7, 1, 5, 9, 1, 1, 11, 0, 1, 13, 1, 1, 24, 1, 7, 17, 1, 0, 19, 1, 1, 21, 13, 1, 23, 1, 1, 25, 0, 1, 27, 1, 17, 29, 1, 13, 31, 0, 1, 33, 1, 1, 56, 1, 1, 37, 1, 0, 39, 0, 11, 41, 25, 1, 43, 1, 19, 45, 1, 1, 47, 0, 29, 49, 1, 1, 51, 0, 1, 53, 0, 1, 88, 1, 13, 57, 1, 25, 59, 1, 1, 61, 37, 0, 63, 1, 1, 65, 1
Offset: 0

Views

Author

Jonathan Sondow, Aug 13 2013

Keywords

Comments

Except for A046094(2) = 1, the even-indexed terms of A046094 are all zero since Bernoulli(2n+1) = 0 for n > 0.

Examples

			-(2*1+1)*Bernoulli(2*1) = -3*(1/6) = -1/2 == -2 == 1 mod 3, so a(1) = 1.
		

Crossrefs

a(n) = A046094(2n+1).

Programs

  • Maple
    a:= n-> -(2*n+1)*bernoulli(2*n) mod (2*n+1):
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 13 2013
  • Mathematica
    a[ n_ ] := Mod[ Numerator[ -(2 n + 1)* BernoulliB[ 2 n]] * PowerMod[ Denominator[(2 n + 1)* BernoulliB[ 2 n]], -1, 2 n + 1], 2 n + 1]

Formula

a(n) = - (2n+1)*Bernoulli(2n) mod 2n+1.