|
|
A192498
|
|
Smallest prime p such that there is a gap of tau(n) between p and the next prime, otherwise 0.
|
|
1
|
|
|
2, 3, 3, 0, 3, 7, 3, 7, 0, 7, 3, 23, 3, 7, 7, 0, 3, 23, 3, 23, 7, 7, 3, 89, 0, 7, 7, 23, 3, 89, 3, 23, 7, 7, 7, 0, 3, 7, 7, 89, 3, 89, 3, 23, 23, 7, 3, 139, 0, 23, 7, 23, 3, 89, 7, 89, 7, 7, 3, 199, 3, 7, 23, 0, 7, 89, 3, 23, 7, 89, 3, 199, 3, 7, 23, 23, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For n > 1, a(n)=0 if n is a perfect square (see A048691) because then tau(n) is odd.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(12) = 23 because 29 - 23 = 6 = tau(12).
|
|
MAPLE
|
A000230 := proc(g) if g = 1 then return 2 ; elif type(g, 'odd') then return 0 ; else for i from 1 do if ithprime(i+1)-ithprime(i) = g then return ithprime(i) ; end if; end do: end if; end proc:
|
|
MATHEMATICA
|
Module[{nn=200, prs, dfs, thr}, prs=Prime[Range[nn]]; dfs=Differences[prs]; thr = DeleteDuplicatesBy[Thread[{Most[prs], dfs}], Last]; Join[{2}, Flatten[ Table[ Select[thr, #[[2]]==DivisorSigma[0, n]&], {n, 2, 80}]/.{}->{{0, 0}}, 1][[All, 1]]]] (* Harvey P. Dale, Mar 09 2021 *)
|
|
PROG
|
(PARI)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|