|
|
A192496
|
|
Smallest prime p such that there is a gap of sigma(n) between p and the next prime, otherwise 0.
|
|
1
|
|
|
2, 0, 7, 0, 23, 199, 89, 0, 0, 523, 199, 2971, 113, 1669, 1669, 0, 523, 0, 887, 16141, 5591, 9551, 1669, 43331, 0, 16141, 19333, 82073, 4297, 31397, 5591, 0, 28229, 35617, 28229, 0, 30593, 43331, 82073, 404851, 16141, 360653, 15683, 461717, 188029, 31397, 28229, 6752623, 0, 0, 31397
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For n > 1, a(n)=0 if sigma(n) is odd. Sigma(n) is odd iff n is a square or twice a square. - Robert G. Wilson v, Oct 03 2001
|
|
LINKS
|
|
|
EXAMPLE
|
a(6) = 199 because 211 - 199 = 12 = sigma(6).
|
|
MAPLE
|
A000230 := proc(n) option remember; local i ; for i from 1 do if ithprime(i+1) -ithprime(i) = 2*n then return ithprime(i) ; end if; end do: end proc:
A192496 := proc(n) s := numtheory[sigma](n) ; if s = 1 then 2 ; elif type(s, 'odd') then 0; else A000230(s/2) ; end if; end proc:
|
|
MATHEMATICA
|
With[{s = Differences@ Prime@ Range[10^6]}, Array[Prime@ FirstPosition[s, DivisorSigma[1, #]][[1]] /. k_ /; ! IntegerQ@ k -> 0 &, 51]] (* Michael De Vlieger, Nov 23 2017 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|