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.

A195465 The first a(n) n-gap primes are lessers of twin primes, a(n) maximal.

This page as a plain text file.
%I A195465 #20 Nov 21 2020 16:14:54
%S A195465 0,5,5,17,5,6,14,6,24,75,2,4,27,11,48,50,46,9,21,7,16,137,4,55,85,14,
%T A195465 111,24,102,291,67,89,155,180,137,330,127,413,250,241,332,619,139,234,
%U A195465 453,929,94,160,169,22,131,434
%N A195465 The first a(n) n-gap primes are lessers of twin primes, a(n) maximal.
%C A195465 For definition of n-gap primes, see comment to A195270.
%C A195465 Conjecture: a(n)>0 for n>1. This conjecture is equivalent to the conjecture that all terms of A195325 are lessers of twin primes.
%p A195465 a:= proc(n) local i, p, q;
%p A195465       p, q:= 2, 3;
%p A195465       for i from 0 do
%p A195465         while nextprime(n*p) < (n*q) do
%p A195465           p, q:= q, nextprime(q)
%p A195465         od;
%p A195465         if not isprime(p+2) then return i fi;
%p A195465         p, q:= q, nextprime(q)
%p A195465       od
%p A195465     end:
%p A195465 seq(a(n), n=1..20);  # _Alois P. Heinz_, Sep 20 2011
%t A195465 a[n_] := a[n] = Module[{i, p = 2, q = 3}, For[i = 0, True, i++, While[NextPrime[n p] < n q, p = q; q = NextPrime[q]]; If[!PrimeQ[p+2], Return[i]]; p = q; q = NextPrime[q]]];
%t A195465 Array[a, 20] (* _Jean-François Alcover_, Nov 21 2020, after _Alois P. Heinz_ *)
%Y A195465 Cf. A195325, A080192, A195270, A195271, A164368, A194658, A164294.
%K A195465 nonn
%O A195465 1,2
%A A195465 _Vladimir Shevelev_, Sep 19 2011