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.
%I A324656 #30 Jun 07 2019 19:35:32 %S A324656 5,0,0,0,1,0,1,0,0,0,1,0,2,0,0,0,2,0,0,0,0,0,3,0,0,0,0,0,4,0,2,0,0,0, %T A324656 0,0,0,0,0,0,5,0,0,0,0,0,2,0,0,0,0,0,1,0,0,0,0,0,1,0,3,0,0,0,0,0,3,0, %U A324656 0,0,2,0,5,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,1,0,0 %N A324656 a(n) is the number of successive primorials A002110(i) larger than n that need to be tried before sum n + A002110(i) is found to be composite. %C A324656 a(n) = 0 if n + A002110(A235224(n)), i.e., n plus {the least primorial > n} is composite. %C A324656 a(n) = 1 if n + A002110(A235224(n)) is prime, but n + A002110(1+A235224(n)) is composite. %C A324656 a(n) = k if n + A002110(j+A235224(n)) is prime for j=0..k-1, but n + A002110(k+A235224(n)) is composite. %H A324656 Antti Karttunen, <a href="/A324656/b324656.txt">Table of n, a(n) for n = 1..20000</a> %H A324656 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %H A324656 <a href="/index/Pri#primorial_numbers">Index entries for sequences related to primorial numbers</a> %e A324656 For n=1, it is not a composite number, so we add a next larger primorial (A002110) to it, which is 2, and we see that 3 is also noncomposite, thus we try to add (to the original n, which is 1) the next larger primorial, which is 6, and 7 is also prime, as are also 31, 211 and 2311. Only with A002110(6), 30030 + 1 is not a prime, thus a(1) = 5. %e A324656 For n=3, the next larger primorial is 6, but 3+6 = 9 is composite, thus a(3) = 0. %e A324656 For n=29, which is prime, we try adding it to four successively larger primorial numbers 30, 210, 2310, 30030, until we find 510510 which gives sum 510539 which is composite, thus a(29) = 4. In primorial base (A049345), 29 is written as 421 and the successive sums tested are: 1421, 10421, 100421, 1000421 and 10000421. %e A324656 For n=121, which is not prime, but 210+121 = 331 is, while 2310+121 = 2431 is not, a(121) = 1. %o A324656 (PARI) %o A324656 A002110(n) = prod(i=1,n,prime(i)); %o A324656 A235224(n, p=2) = if(!n, n, 1+A235224(n\p, nextprime(p+1))); %o A324656 A324656(n) = { my(k=0,b=A235224(n)); while(isprime(n+A002110(k+b)), k++); (k); }; %Y A324656 Cf. A002110, A049345 (A324550), A235224, A324657. %Y A324656 Cf. also A005235, A324642. %K A324656 nonn %O A324656 1,1 %A A324656 _Antti Karttunen_, Mar 11 2019