OFFSET
2,36
COMMENTS
Note offset is 2: only odd primes are considered.
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..10001
FORMULA
0 if p is a regular prime; > 0 if p is an irregular prime.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe and Benoit Cloitre, Feb 09 2004
STATUS
approved