login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226159 a(n) = -prime(n) if prime(n) is an irregular prime else prime(n). 0
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, -37, 41, 43, 47, 53, -59, 61, -67, 71, 73, 79, 83, 89, 97, -101, -103, 107, 109, 113, 127, -131, 137, 139, -149, 151, -157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, -233, 239, 241, 251, -257, -263 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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)
def A226159_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
Sequence in context: A322394 A295425 A158611 * A182986 A000040 A008578
KEYWORD
sign
AUTHOR
Peter Luschny, Jun 27 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)