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.

A091888 Irregularity index of prime(n): number of numbers k, 1 <= k <= (p-3)/2, such that p = prime(n) divides the numerator of the Bernoulli number B(2k).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 2, 0, 0, 3, 0, 0, 0, 0, 1, 1, 2, 1, 0, 0, 0, 1
Offset: 2

Views

Author

T. D. Noe and Benoit Cloitre, Feb 09 2004

Keywords

Comments

Note offset is 2: only odd primes are considered.

Crossrefs

Cf. A073277 (primes having irregularity index 2), A060975 (primes having irregularity index 3), A061576 (least prime having irregularity index n), A091887 (irregularity index of irregular prime A000928(n)).

Programs

  • Mathematica
    irregPrimeIndex[n_] := Block[{p = Prime[n], cnt = 0, k = 1}, While[ 2k + 2 < p, If[ Mod[ Numerator[ BernoulliB[ 2k]], p] == 0, cnt++]; k++]; cnt]; Array[ irregPrimeIndex, 105, 2] (* Robert G. Wilson v, Sep 20 2012 *)
  • PARI
    a(n)=sum(i=1,(prime(n)-1)/2,if(numerator(bernfrac(2*i))%prime(n),0,1))  \\ corrected by Amiram Eldar, May 10 2022

Formula

0 if p is a regular prime; > 0 if p is an irregular prime.