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.

A173487 Integers n such that 4*prime(n)-+3 are nonconsecutive primes.

This page as a plain text file.
%I A173487 #20 Dec 21 2015 13:06:51
%S A173487 1,3,5,95,98,175,189,458,487,501,541,638,735,969,1015,1027,1526,2133,
%T A173487 2256,2290,2329,2506,2600,2699,3106,3939,3999,4552,5548,5585,5611,
%U A173487 5803,5838,6355,6756,6856,6982,6983,7070,7107,7167,7383,8421,8868,9157,9249,9405
%N A173487 Integers n such that 4*prime(n)-+3 are nonconsecutive primes.
%C A173487 Subsequence of A174011: 4*prime(n)-+3 are both prime. - _Michel Marcus_, Apr 07 2014
%H A173487 Robert Israel, <a href="/A173487/b173487.txt">Table of n, a(n) for n = 1..3000</a>
%e A173487 a(1)=1 because 4*prime(1)-3=5=3rd prime and 4*prime(1)+3=11=5th prime;
%e A173487 a(2)=3 because 4*prime(3)-3=17=7th prime and 4*prime(3)+3=23=9th prime;
%e A173487 a(3)=5 because 4*prime(5)-3=41=13th prime and 4*prime(5)+3=47=15th prime;
%e A173487 a(4)=95 because 4*prime(95)-3=1993=301st prime and 4*prime(95)=3=1999=303rd prime.
%p A173487 N:= 1000: # to get a(1) to a(N)
%p A173487 p:= 0:
%p A173487 A:= NULL:
%p A173487 count:= 0:
%p A173487 for n from 1 while count < N do
%p A173487 p:= nextprime(p);
%p A173487 if isprime(4*p-3) and isprime(4*p+3) and (isprime(4*p-1) or isprime(4*p+1))
%p A173487     then count:= count+1; A:= A, n
%p A173487 fi
%p A173487 od:
%p A173487 A; # _Robert Israel_, Dec 20 2015
%t A173487 Select[Range@ 10000, And[PrimeQ[4 Prime[#] - 3], PrimeQ[4 Prime[#] + 3], NextPrime[4 Prime[#] - 3] != 4 Prime[#] + 3] &] (* _Michael De Vlieger_, Dec 20 2015 *)
%o A173487 (PARI) isok(n) = isprime(pa=4*prime(n)-3) && isprime(pb=4*prime(n)+3) && (primepi(pb) - primepi(pa) != 1); \\ _Michel Marcus_, Apr 07 2014
%Y A173487 Cf. A000040, A002145, A111055.
%K A173487 nonn
%O A173487 1,2
%A A173487 _Juri-Stepan Gerasimov_, Mar 05 2010
%E A173487 Corrected (85 replaced by 95, 286 and 321 removed) and extended by _R. J. Mathar_, May 02 2010
%E A173487 More terms from _Michel Marcus_, Apr 07 2014