OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
n=5, {n-2,n+2}={3,7}, sigma(3)=4, sigma(7)=8, and sigma(5)=6=(4+8)/2.
MAPLE
with(numtheory); A099631:=n->`if`(sigma(n)=(sigma(n-2)+sigma(n+2))/2, n, NULL); # Wesley Ivan Hurt, Feb 03 2014
MATHEMATICA
Flatten[Position[Partition[DivisorSigma[1, Range[30000]], 5, 1], _?((Last[ #]+ First[ #])/2==#[[3]]&), {1}, Heads->False]]+2 (* Harvey P. Dale, Feb 01 2015 *)
PROG
(PARI) isok(n) = (sigma(n-2) + sigma(n+2))/2 == sigma(n); \\ Michel Marcus, Dec 30 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Oct 26 2004
STATUS
approved