login
A161911
a(n) is the n-th difference between consecutive primes minus the number of divisors of n.
7
0, 0, 0, 1, 0, 0, 0, 0, 3, -2, 4, -2, 0, 0, 2, 1, 0, 0, 2, -4, 2, 0, 4, 0, 1, -2, 0, -4, 2, 6, 2, 0, -2, 6, -2, -3, 4, 0, 2, -2, 0, 2, 0, -2, -4, 8, 10, -6, -1, -2, 2, -4, 8, -2, 2, -2, -2, 2, 2, -10, 8, 10, -2, -5, 0, 6, 4, 4, -2, -4, 4, -4, 4, 2, -2, 0, 4, -4, 6, 0, -3, 6, 0, -6, 0, 2, 4, -4
OFFSET
1,9
FORMULA
a(n) = A001223(n) - A000005(n).
MAPLE
A001223 := proc(n) ithprime(n+1)-ithprime(n) ; end: A000005 := proc(n) numtheory[tau](n) ; end: A161911 := proc(n) A001223(n)-A000005(n) ; end: seq(A161911(n), n=1..120) ; # R. J. Mathar, Jul 01 2009
MATHEMATICA
With[{nn=90}, #[[1]]-DivisorSigma[0, #[[2]]]&/@Thread[{Differences[Prime[ Range[ nn]]], Range[nn-1]}]] (* Harvey P. Dale, Oct 01 2018 *)
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Omar E. Pol, Jun 28 2009
EXTENSIONS
More terms from R. J. Mathar, Jul 01 2009
STATUS
approved