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.

A137330 a(n) = primorial(k) - prime(n) where k is the smallest number for which prime(n) <= primorial(k).

This page as a plain text file.
%I A137330 #18 Dec 27 2020 21:54:43
%S A137330 0,3,1,23,19,17,13,11,7,1,179,173,169,167,163,157,151,149,143,139,137,
%T A137330 131,127,121,113,109,107,103,101,97,83,79,73,71,61,59,53,47,43,37,31,
%U A137330 29,19,17,13,11,2099,2087,2083,2081,2077,2071,2069,2059,2053,2047,2041
%N A137330 a(n) = primorial(k) - prime(n) where k is the smallest number for which prime(n) <= primorial(k).
%C A137330 Does each prime number appear in this sequence at least once?
%C A137330 Answer to previous: Neither 2 nor 5 will appear, as no prime > 5 can end in a 5 or be even. - _Bill McEachen_, Dec 05 2020
%H A137330 Michael De Vlieger, <a href="/A137330/b137330.txt">Table of n, a(n) for n = 1..10000</a>
%e A137330 a(6) = primorial(3) - prime(6) = 30-13 = 17.
%t A137330 Block[{a = {}, P = 2, j = 1}, Do[AppendTo[a, If[# > P, j++; P *= Prime[j], P] - #] &@ Prime[n], {n, 57}]; a] (* _Michael De Vlieger_, Dec 07 2020 *)
%o A137330 (PARI) a(n) = {my(pp=2, k=1, p=prime(n)); while (pp < p, k++; pp*=prime(k)); pp-p;} \\ _Michel Marcus_, Dec 06 2020
%Y A137330 Cf. A000040, A002110, A136437.
%K A137330 easy,nonn
%O A137330 1,2
%A A137330 _Ctibor O. Zizka_, Apr 07 2008