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.

A175663 Maximal run length of primes of the form n, n+2, n+2*3, n+2*3*5,..

This page as a plain text file.
%I A175663 #13 Jan 04 2019 09:03:56
%S A175663 0,1,2,0,3,0,1,0,0,0,4,0,1,0,0,0,5,0,1,0,0,0,1,0,0,0,0,0,2,0,1,0,0,0,
%T A175663 0,0,1,0,0,0,9,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,2,0,1,0,0,0,0,0,1,0,
%U A175663 0,0,2,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,6,0,1,0,0
%N A175663 Maximal run length of primes of the form n, n+2, n+2*3, n+2*3*5,..
%H A175663 Antti Karttunen, <a href="/A175663/b175663.txt">Table of n, a(n) for n = 1..16384</a>
%H A175663 Antti Karttunen, <a href="/A175663/a175663.txt">Data supplement: n, a(n) computed for n = 1..100000</a>
%F A175663 a(n) <= A175682(n). - _Antti Karttunen_, Jan 03 2019
%e A175663 a(107)=8 because 107=prime, 107+2=109=prime, 107+2*3=113=prime, 107+2*3*5=137=prime, 107+2*3*5*7=317=prime, 107+2*3*5*7*11=2417=prime, 107+2*3*5*7*11*13=30137=prime, 107+2*3*5*7*11*13*17=510617=prime.
%p A175663 A002110 := proc(n) option remember; mul(ithprime(i),i=1..n) ; end proc:
%p A175663 A175663 := proc(n) if isprime(n) then for p from 1 do if not isprime(n+A002110(p)) then return p ; end if; end do: else return 0 ; end if; end proc:
%p A175663 seq(A175663(n),n=1..120) ; # _R. J. Mathar_, Aug 07 2010
%t A175663 Array[If[PrimeQ@ #, Block[{s = {1}}, While[PrimeQ[# + Times @@ Prime@ s], AppendTo[s, s[[-1]] + 1]]; Last@ s], 0] &, 105] (* _Michael De Vlieger_, Jan 03 2019 *)
%o A175663 (PARI) A175663(n) = if(!isprime(n),0,my(pr=2); for(k=1, oo, if(!isprime(pr+n), return(k)); pr *= prime(1+k))); \\ _Antti Karttunen_, Jan 03 2019
%Y A175663 Cf. A006512 (greater of twin primes), A175612 (list of twin semiprimes), A175648 (lesser of twin semiprimes).
%Y A175663 Cf. also A175682.
%K A175663 nonn
%O A175663 1,3
%A A175663 Vladislav-Stepan Malakovsky & _Juri-Stepan Gerasimov_, Aug 04 2010