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.

A103786 a(n) is the minimum k that makes primorial P(n)/A019565(k)+A019565(k) prime, k>=0, n>0.

This page as a plain text file.
%I A103786 #3 Mar 31 2012 10:23:47
%S A103786 0,0,0,0,0,1,3,3,5,1,0,1,6,6,1,11,1,3,3,4,2,14,5,2,9,22,5,8,1,45,23,
%T A103786 13,10,2,13,24,42,7,20,9,8,10,114,5,31,5,33,1,6,19,22,6,7,4,20,59,65,
%U A103786 4,29,15,3,6,1,12,32,17,26,34,8,59,115,32,33,26,0,25,1,35,71,27,65,75,71,5
%N A103786 a(n) is the minimum k that makes primorial P(n)/A019565(k)+A019565(k) prime, k>=0, n>0.
%C A103786 This is the k value of A103785. Conjecture: sequence is defined for all n>=1.
%e A103786 for n=1, P(1)/A019565(0)+A019565(0)=2/1+1=3 is prime, so a(1)=0;
%e A103786 for n=7, P(7)/A019565(3)+A019565(3)=510510/6+6=85091 is prime, so a(7)=3;
%t A103786 nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tn = 0; tt = 1; cp = npd/tt + tt; While[(IntegerQ[cp]) && (! (PrimeQ[cp])), tn = tn + 1; tt = 1; k1 = tn; o = 1; While[k1 > 0, k2 = Mod[k1, 2]; If[k2 == 1, tt = tt*Prime[o]]; k1 = (k1 - k2)/2; o = o + 1]; cp = npd/tt + tt]; Print[tn]; n = n + 1; npd = npd*Prime[n]]
%Y A103786 Cf. A019565, A002110, A103785.
%K A103786 nonn
%O A103786 1,7
%A A103786 _Lei Zhou_, Feb 15 2005