login
A172055
n-th number k such that 6*k-1 is composite while 6*k+1 is prime plus n-th number m such that 6*m-1 is prime while 6*m+1 is composite.
1
10, 19, 22, 30, 36, 45, 49, 63, 66, 85, 93, 98, 100, 110, 115, 122, 126, 132, 138, 143, 155, 158, 168, 171, 178, 185, 187, 198, 206, 213, 217, 229, 231, 236, 239, 243, 248, 255, 269, 275, 284, 293, 300, 309, 317, 321, 325, 331, 337, 343, 349, 351, 357, 378
OFFSET
1,1
LINKS
FORMULA
a(n) = A121765(n) + A121763(n).
MAPLE
A121765:=select(k->not isprime(6*k-1) and isprime(6*k+1), [$1..350]):
A121763:=select(n->not isprime(6*n+1) and isprime(6*n-1), [$1..350]):
seq(A121765[m]+A121763[m], m=1..60); # Muniru A Asiru, Feb 21 2019
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
(Magma)
A121765:=[n: n in [1..350] | not IsPrime(6*n-1) and IsPrime(6*n+1)];
A121763:=[n: n in [1..350] | IsPrime(6*n-1) 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*n-1) and is_prime(6*n+1)];
A121763=[n for n in (1..350) if is_prime(6*n-1) and not is_prime(6*n+1)];
[A121765[n] + A121763[n] for n in (0..80)] # G. C. Greubel, Feb 20 2019
(GAP)
A121765:=Filtered([1..350], k-> not IsPrime(6*k-1) and IsPrime(6*k+1));;
A121763:=Filtered([1..350], n-> not IsPrime(6*n+1) and IsPrime(6*n-1));;
Print(List([1..80], j->A121765[j]+A121763[j])); # G. C. Greubel, Feb 20 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Entries checked by R. J. Mathar, May 22 2010
STATUS
approved