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.

A380199 Smallest number of leading digits of A002110(n) (primorial(n)) that form a prime (or 0 if none exist).

This page as a plain text file.
%I A380199 #19 Jan 29 2025 16:35:16
%S A380199 0,1,0,1,1,1,1,1,0,1,4,1,1,1,2,2,1,2,2,1,1,0,1,1,1,1,1,1,1,1,1,3,1,1,
%T A380199 26,3,1,1,1,4,7,1,1,3,2,1,1,17,1,2,2,6,0,1,0,25,2,2,1,3,1,21,1,32,2,2,
%U A380199 2,25,1,1,1,0,1,10,9,2,0,1,3,0,0,17,1,6
%N A380199 Smallest number of leading digits of A002110(n) (primorial(n)) that form a prime (or 0 if none exist).
%H A380199 Jean-Marc Rebert, <a href="/A380199/b380199.txt">Table of n, a(n) for n = 0..304</a>
%e A380199 For n = 2, primorial(2) = 6, 6 is not prime, a(2) = 0.
%e A380199 For n = 10, primorial(10) = 6469693230, 6469 is the smallest prime, a(10) = 4.
%e A380199  n  primorial(n) a(n)
%e A380199  0            1  0
%e A380199  1            2  1
%e A380199  2            6  0
%e A380199  3           30  1
%e A380199  4          210  1
%e A380199  5         2310  1
%e A380199  6        30030  1
%e A380199  7       510510  1
%e A380199  8      9699690  0
%e A380199  9    223092870  1
%e A380199 10   6469693230  4
%t A380199 lim=84;p=FoldList[Times, 1, Prime[Range[lim]]];Table[l=Length[IntegerDigits[p[[n]]]];a=0;Do[If[PrimeQ[FromDigits[Take[IntegerDigits[p[[n]]],i]]],a=i;Break[]],{i,l}];a,{n,lim}] (* _James C. McMahon_, Jan 29 2025 *)
%o A380199 (PARI) a(n) = my(d=digits(factorback(primes(n)))); for(k=1, #d, if (isprime(fromdigits(Vec(d, k))), return(k))); return (0); \\ _Michel Marcus_, Jan 19 2025
%Y A380199 Cf. A000040, A002110, A379944.
%K A380199 nonn,base
%O A380199 0,11
%A A380199 _Jean-Marc Rebert_, Jan 16 2025