cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A172055 #11 Sep 08 2022 08:45:50
%S A172055 10,19,22,30,36,45,49,63,66,85,93,98,100,110,115,122,126,132,138,143,
%T A172055 155,158,168,171,178,185,187,198,206,213,217,229,231,236,239,243,248,
%U A172055 255,269,275,284,293,300,309,317,321,325,331,337,343,349,351,357,378
%N 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.
%H A172055 G. C. Greubel, <a href="/A172055/b172055.txt">Table of n, a(n) for n = 1..10000</a>
%F A172055 a(n) = A121765(n) + A121763(n).
%p A172055 A121765:=select(k->not isprime(6*k-1) and isprime(6*k+1),[$1..350]):
%p A172055 A121763:=select(n->not isprime(6*n+1) and isprime(6*n-1),[$1..350]):
%p A172055 seq(A121765[m]+A121763[m],m=1..60); # _Muniru A Asiru_, Feb 21 2019
%t A172055 A121765:= Select[Range[350], !PrimeQ[6#-1] && PrimeQ[6#+1] &];
%t A172055 A121763:= Select[Range[350], PrimeQ[6#-1] && !PrimeQ[6#+1] &];
%t A172055 Table[A121765[[n]] + A121763[[n]], {n, 1, 80}] (* _G. C. Greubel_, Feb 20 2019 *)
%o A172055 (Magma)
%o A172055 A121765:=[n: n in [1..350] | not IsPrime(6*n-1) and  IsPrime(6*n+1)];
%o A172055 A121763:=[n: n in [1..350] | IsPrime(6*n-1) and not IsPrime(6*n+1)];
%o A172055 [A121765[n] + A121763[n]: n in [1..80]]; // _G. C. Greubel_, Feb 20 2019
%o A172055 (Sage)
%o A172055 A121765=[n for n in (1..350) if not is_prime(6*n-1) and is_prime(6*n+1)];
%o A172055 A121763=[n for n in (1..350) if is_prime(6*n-1) and not is_prime(6*n+1)];
%o A172055 [A121765[n] + A121763[n] for n in (0..80)] # _G. C. Greubel_, Feb 20 2019
%o A172055 (GAP)
%o A172055 A121765:=Filtered([1..350],k-> not IsPrime(6*k-1) and IsPrime(6*k+1));;
%o A172055 A121763:=Filtered([1..350],n-> not IsPrime(6*n+1) and IsPrime(6*n-1));;
%o A172055 Print(List([1..80],j->A121765[j]+A121763[j])); # _G. C. Greubel_, Feb 20 2019
%Y A172055 Cf. A121763, A171765, A172054.
%K A172055 nonn
%O A172055 1,1
%A A172055 _Juri-Stepan Gerasimov_, Jan 24 2010
%E A172055 Entries checked by _R. J. Mathar_, May 22 2010