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.

A115334 Numbers d > 0 such that 3+2d and 3+4d are primes.

This page as a plain text file.
%I A115334 #30 Jun 03 2024 13:33:24
%S A115334 1,2,4,5,7,10,14,17,19,20,25,32,34,40,47,49,52,55,62,67,77,82,89,94,
%T A115334 95,104,110,115,119,124,130,140,154,157,164,172,185,209,214,215,220,
%U A115334 227,229,242,259,272,280,287,292,305,307,314,319,320,322,325,329,349,362
%N A115334 Numbers d > 0 such that 3+2d and 3+4d are primes.
%C A115334 Then { 3, 3+2d, 3+4d } is an arithmetic progression of primes. However, the next term, 3+6d = 3(1+2d), is clearly composite. - _Jeppe Stig Nielsen_, Jun 20 2022
%H A115334 Vincenzo Librandi, <a href="/A115334/b115334.txt">Table of n, a(n) for n = 1..1000</a>
%F A115334 a(n) = A206037(n)/2. - _Wesley Ivan Hurt_, Feb 06 2014
%e A115334 5 is in the sequence because 3 + 2*5 = 13 and 3 + 4*5 = 23 are both prime.
%t A115334 Do[If[PrimeQ[{3+2d,3+4d}]=={True,True},Print[d]],{d,100000}]
%t A115334 Select[Range[400],And@@PrimeQ[{3+2#,3+4#}]&] (* _Harvey P. Dale_, Sep 02 2013 *)
%o A115334 (Magma) [ n: n in [1..365] | IsPrime(3+2*n) and IsPrime(3+4*n) ]; /* _Klaus Brockhaus_, May 14 2009 */
%o A115334 (Python)
%o A115334 from sympy import isprime
%o A115334 from itertools import count, islice
%o A115334 def agen(): # generator of terms
%o A115334     yield from (d for d in count(1) if isprime(3+2*d) and isprime(3+4*d))
%o A115334 print(list(islice(agen(), 60))) # _Michael S. Branicky_, Jun 20 2022
%Y A115334 Cf. A160394. [_Klaus Brockhaus_, May 14 2009]
%K A115334 nonn
%O A115334 1,2
%A A115334 _Zak Seidov_, Mar 06 2006