Nothing Special   »   [go: up one dir, main page]

login
A152952
Von Staudt primes which are not safe primes (A005385).
1
239, 443, 647, 659, 827, 1223, 1259, 1499, 1787, 1847, 2087, 2243, 2339, 2687, 2699, 3299, 3659, 3767, 4943, 5903, 6263, 6287, 6299, 6563, 6863, 6959, 7043, 7487, 7583, 7883, 7907, 7919, 8087, 8219, 8243, 8387, 8627, 8663
OFFSET
1,1
EXAMPLE
239 is a von Staudt prime because the denominator(B(239-1)/(239-1))=239*12, where B(n) is the Bernoulli number, but (239-1)/2=119=7*17 is not a prime.
MAPLE
a := proc(n) local k, L; L:= []; for k from 11 by 12 to n do map(i->i+1, divisors(k-1)); select(isprime, %) minus {2, 3}; if % = {k} then L := [op(L), k] fi; od; select(isprime, map(i->i+i+1, select(isprime, [$1..iquo(n, 2)]))): sort(convert(convert(L, set) minus convert(%, set), list)): end:
MATHEMATICA
vonStaudtPrimeQ[p_?PrimeQ] := Denominator[BernoulliB[p-1]/(p-1)] == 12*p; safePrimeQ[p_?PrimeQ] := PrimeQ[(p-1)/2]; Reap[For[p = 2, p < 10^4, p = NextPrime[p], If[vonStaudtPrimeQ[p] && !safePrimeQ[p], Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Jan 27 2014 *)
CROSSREFS
Sequence in context: A294092 A056086 A046012 * A142356 A142557 A164290
KEYWORD
nonn
AUTHOR
Peter Luschny, Dec 25 2008
STATUS
approved