login
A171716
a(n) = abs((n-th prime of the form 6*k+1) minus (n-th prime of the form 6*m-1))/2.
1
1, 1, 1, 4, 4, 1, 7, 7, 7, 4, 7, 7, 4, 10, 13, 10, 10, 7, 7, 10, 10, 10, 13, 1, 4, 16, 13, 13, 22, 22, 25, 22, 19, 25, 13, 13, 19, 13, 16, 16, 10, 13, 10, 19, 19, 28, 31, 28, 34, 34, 40, 25, 25, 25, 22, 25, 31, 28, 25, 31, 37, 37, 31, 34, 28, 25, 22, 25, 25, 16, 22, 19, 25, 22, 25
OFFSET
1,4
FORMULA
a(n) = abs(A003627(n+1) - A007645(n+1))/2 = abs(A002476(n) - A007528(n))/2.
EXAMPLE
a(1) = abs(6*1 + 1 - (6*1 - 1))/2 = 1;
a(2) = abs(6*2 + 1 - (6*2 - 1))/2 = 1.
MAPLE
A002476 := proc(n) if n = 1 then 7; else for a from procname(n-1)+6 by 6 do if isprime(a) then return a; end if; end do: end if; end proc:
A007528 := proc(n) if n = 1 then 5; else for a from procname(n-1)+6 by 6 do if isprime(a) then return a; end if; end do: end if; end proc:
A171716 := proc(n) A002476(n)-A007528(n) ; abs(%)/2 ; end proc: seq(A171716(n), n=1..120) ; # R. J. Mathar, May 22 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(26) corrected by R. J. Mathar, May 22 2010
STATUS
approved