

A172054


nth number k such that 6*k1 is composite while 6*k+1 is prime minus nth number m such that 6*m1 is prime while 6*m+1 is composite.


2



2, 3, 4, 2, 6, 7, 5, 7, 8, 7, 9, 12, 12, 12, 9, 4, 6, 4, 8, 9, 7, 8, 12, 11, 14, 17, 17, 12, 18, 17, 19, 13, 13, 10, 11, 9, 8, 7, 15, 17, 18, 13, 12, 13, 13, 11, 11, 15, 19, 19, 23, 23, 19, 12, 16, 17, 12, 11, 18, 22, 27, 29, 27, 27, 25, 18, 27, 28, 23, 22, 23, 17, 21, 24, 23, 23, 30
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Are there negative terms?
The entries are positive for at least the first 250000 terms.  R. J. Mathar, May 22 2010


LINKS

Muniru A Asiru, Table of n, a(n) for n = 1..20000


FORMULA

a(n) = A121765(n)  A121763(n).


EXAMPLE

The number 6 is the first integer k such that 6*k1 is composite while 6*k+1 is prime, the number 4 is the first integer m such that 6*m 1 is prime while 6*m+1 is composite, so, 2 = 6  4 is the first term a(1) of this sequence.  Bernard Schott, Feb 18 2019


MAPLE

A121765 := proc(n) option remember; if n = 1 then 6; else for a from procname(n1)+1 do if 6*a1 >=4 and not isprime(6*a1) and isprime(6*a+1) then return a; end if; end do; end if; end proc:
A121763 := proc(n) option remember; if n = 1 then 4; else for a from procname(n1)+1 do if 6*a+1 >=4 and not isprime(6*a+1) and isprime(6*a1) then return a; end if; end do; end if; end proc:
A172054 := proc(n) A121765(n)A121763(n) ; end proc:
seq(A172054(n), n=1..120) ; # R. J. Mathar, May 22 2010


MATHEMATICA

A121765:= Select[Range[350], !PrimeQ[6#1] && PrimeQ[6#+1] &];
A121763:= Select[Range[350], PrimeQ[6#1] && !PrimeQ[6#+1] &];
Table[A121765[[n]]  A121763[[n]], {n, 1, 80}] (* G. C. Greubel, Feb 20 2019 *)


PROG

(GAP) L:=500;;
K:=Filtered([1..L], k> not IsPrime(6*k1) and IsPrime(6*k+1));;
M:=Filtered([1..L], m> not IsPrime(6*m+1) and IsPrime(6*m1));;
a:=List([1..Length(K)], i>K[i]M[i]);; Print(a); # Muniru A Asiru, Feb 19 2019
(MAGMA)
A121765:=[n: n in [1..350]  not IsPrime(6*n1) and IsPrime(6*n+1)];
A121763:=[n: n in [1..350]  IsPrime(6*n1) and not IsPrime(6*n+1)];
[A121765[n]  A121763[n]: n in [1..80]]; // G. C. Greubel, Feb 20 2019
(Sage)
A121765=[n for n in (1..350) if not is_prime(6*n1) and is_prime(6*n+1)];
A121763=[n for n in (1..350) if is_prime(6*n1) and not is_prime(6*n+1)];
[A121765[n]  A121763[n] for n in (0..80)] # G. C. Greubel, Feb 20 2019


CROSSREFS

Cf. A121763, A171765.
Sequence in context: A278963 A308085 A178970 * A047994 A193024 A153038
Adjacent sequences: A172051 A172052 A172053 * A172055 A172056 A172057


KEYWORD

nonn


AUTHOR

JuriStepan Gerasimov, Jan 24 2010


EXTENSIONS

Entries checked by R. J. Mathar, May 22 2010


STATUS

approved



