OFFSET
1,1
MATHEMATICA
regularQ[p_]:= And @@ (!Divisible[ Numerator[ BernoulliB[#]], p] & /@ Range[2, p - 3, 2]); Table[p = Prime[n]; If[ regularQ[p], p, -p], {n, 1, 56}] (*Jean-François Alcover,Jul 02 2013 *)
PROG
(Sage)
defA226159_list(len):
t = [0]*(len+1); t[0] = 1; L = [2]; p = 1
for m in (1..len):
q = m + 1; t[m] = 1 / q
for j in range(m, 0, -1):
t[j - 1] = (t[j - 1] - t[j]) * j
if 2.divides(m):
if q.divides(denominator(t[0])):
if q.divides(p): q = -q
L.append(q)
p *= numerator(t[0])
return L
A226159_list(263)
CROSSREFS
KEYWORD
sign
AUTHOR
Peter Luschny,Jun 27 2013
STATUS
approved