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.

A103787 a(n) = number of k's that make primorial P(n)/A019565(k)+A019565(k) prime, A019565(k)^2<=P(n).

This page as a plain text file.
%I A103787 #17 Nov 07 2016 08:31:28
%S A103787 1,2,4,8,12,21,40,70,117,263,450,703,1385,2423,5501,8617,18249,29352,
%T A103787 61970,103568,209309,404977,853279,1609502,3008915,5342983,10287184,
%U A103787 19087437,38498011,78520137,145642314
%N A103787 a(n) = number of k's that make primorial P(n)/A019565(k)+A019565(k) prime, A019565(k)^2<=P(n).
%C A103787 If we remove the restriction A019565(k)^2<=P(n), every term gets doubled.
%C A103787 Number of distinct primes of the form d + P(n)/d, where P(n) is the n-th primorial A002110(n) and d is a divisor of P(n).
%F A103787 a(n) = A088627(A002110(n)/2).
%e A103787 P(1)=2, A019565(0)=1, 2/1+1=3 is prime, a(1)=1;
%e A103787 P(2)=6, A019565(0)=1, 6/1+1=7; A019565(1)=2, 6/2+2=5; so a(2)=2.
%t A103787 npd = 1; Do[npd = npd*Prime[n]; tn = 0; tt = 1; cp = npd/tt + tt; ct = 0; While[IntegerQ[cp], If[(cp >= (tt*2)) && PrimeQ[cp], ct = ct + 1]; 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[ct], {n, 1, 22}]
%t A103787 Table[ps=Prime[Range[n]]; cnt=0; Do[b=IntegerDigits[i,2,n]; p=Times@@(ps^b) + Times@@(ps^(1-b)); If[PrimeQ[p], cnt++], {i,0,2^(n-1)-1}]; cnt, {n,22}]
%Y A103787 Cf. A002110, A019565, A103785, A103786.
%K A103787 hard,nonn
%O A103787 1,2
%A A103787 _Lei Zhou_, Feb 15 2005
%E A103787 a(28)-a(31) from _James G. Merickel_, Aug 07 2015