login
A173229
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
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, 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, 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
OFFSET
1,1
COMMENTS
A046953 U A046954(without zero) = A067611 where A067611 U A002822 U A171696 = A001477.
FORMULA
a(n) = A046953(n) - A046954(n+1).
EXAMPLE
a(1) = 6 - 4 = 2;
a(2) = 11 - 8 = 3;
a(3) = 13 - 9 = 4.
MAPLE
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:
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:
A173229 := proc(n) A046953(n)-A046954(n+1) ; end proc:
seq(A173229(n), n=1..120) ; # R. J. Mathar, May 02 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Feb 13 2010, Feb 14 2010
EXTENSIONS
Corrected from a(63) onwards by R. J. Mathar, May 02 2010
STATUS
approved