Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
a(n) is the n-th number m such that 6m-1 is composite minus the n-th number k such that 6k+1 is composite.
1

%I #8 Feb 07 2019 02:13:01

%S 2,3,4,2,5,2,4,4,3,3,5,4,2,1,2,5,6,7,7,6,6,6,4,7,5,4,6,4,4,4,4,5,5,6,

%T 5,7,8,7,6,6,6,8,8,9,9,10,8,8,12,8,9,8,9,8,8,8,7,8,7,8,6,4,3,4,4,6,7,

%U 6,6,6,8,6,6,5,5,6,8,7,10,9,9,9,11,11,11,12,11,10,9,7,10,8,8,6,6,6,4,5,5,7

%N a(n) is the n-th number m such that 6m-1 is composite minus the n-th number k such that 6k+1 is composite.

%C A046953 U A046954(without zero) = A067611 where A067611 U A002822 U A171696 = A001477.

%F a(n) = A046953(n) - A046954(n+1).

%e a(1) = 6 - 4 = 2;

%e a(2) = 11 - 8 = 3;

%e a(3) = 13 - 9 = 4.

%p A046953 := proc(n) if n = 1 then 6 ; else for a from procname(n-1)+1 do if not isprime(6*a-1) then return a; end if; end do: end if; end proc:

%p A046954 := proc(n) if n = 1 then 0 ; else for a from procname(n-1)+1 do if not isprime(6*a+1) then return a; end if; end do: end if; end proc:

%p A173229 := proc(n) A046953(n)-A046954(n+1) ; end proc:

%p seq(A173229(n),n=1..120) ; # _R. J. Mathar_, May 02 2010

%Y Cf. A001477, A002822, A067611, A046953, A046954, A171696.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Feb 13 2010, Feb 14 2010

%E Corrected from a(63) onwards by _R. J. Mathar_, May 02 2010