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.

A162338 Primes q such that q = floor(p/3) for some prime p.

This page as a plain text file.
%I A162338 #14 Sep 08 2022 08:45:46
%S A162338 2,3,5,7,13,17,19,23,29,37,43,59,79,83,89,97,103,127,139,149,163,167,
%T A162338 173,197,199,227,233,239,257,269,293,313,317,337,349,353,367,383,397,
%U A162338 409,419,433,439,457,479,499,503,523,569,577,607,643,659,709,757,769
%N A162338 Primes q such that q = floor(p/3) for some prime p.
%C A162338 Primes q such that 3*q+1 or 3*q+2 is prime. Agrees with A023208 except for initial term 2.
%C A162338 Essentially the same as A023208. - _R. J. Mathar_, Jul 05 2009
%e A162338 3 is in the sequence since 11 is prime and floor(11/3) = 3; 11 is not in the sequence since 11 = floor(34/3) = floor(35/3) and neither 34 nor 35 is prime.
%t A162338 lst={};Do[r=Prime[n];If[PrimeQ[p=Floor[r/3]],AppendTo[lst,p]],{n,6!}];lst
%t A162338 Select[Floor[Prime[Range[350]]/3],PrimeQ] (* _Harvey P. Dale_, Aug 26 2013 *)
%t A162338 Select[Prime[Range[200]],AnyTrue[3#+{1,2},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Aug 07 2019 *)
%o A162338 (Magma) [ q: q in PrimesUpTo(800) | IsPrime(3*q+1) or IsPrime(3*q+2) ]; // _Klaus Brockhaus_, Jul 06 2009
%o A162338 (PARI) isA162338(n) = isprime(n) && (isprime(3*n+1) || isprime(3*n+2)) \\ _Michael B. Porter_, Jan 30 2010
%Y A162338 Cf. A162337. Essentially the same as A023208 (n and 3n+2 are both prime).
%K A162338 nonn
%O A162338 1,1
%A A162338 _Vladimir Joseph Stephan Orlovsky_, Jul 01 2009
%E A162338 Edited and listed terms verified by _Klaus Brockhaus_, Jul 06 2009