1,4

Table of n, a(n) for n=1..75.

a(n) = abs(A003627(n+1) - A007645(n+1))/2 = abs(A002476(n) - A007528(n))/2.

a(1) = abs(6*1 + 1 - (6*1 - 1))/2 = 1;

a(2) = abs(6*2 + 1 - (6*2 - 1))/2 = 1.

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

Cf. A002476, A003627, A007528, A007645.

Sequence in context: A016495 A047213 A128213 * A211788 A318732 A016706

Adjacent sequences: A171713 A171714 A171715 * A171717 A171718 A171719

nonn

Juri-Stepan Gerasimov, Dec 17 2009

a(26) corrected by R. J. Mathar, May 22 2010

approved