A275451 Number of occurrences of the string n in primorial(n).
0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 1, 0, 2, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 3, 0, 0, 3, 2, 2, 1, 1, 1, 1, 2, 0, 5, 4, 4, 2, 4, 4, 0, 0, 4, 2, 4, 3, 1, 0, 1, 0, 1, 2
Offset: 1
Examples
Primorial(3) equals 30, which contains 3 once, therefore a(3) = 1.
Programs
-
Mathematica
primorial[n_]:=Product[Prime[i],{i,1,n}]; Table[Length[StringPosition[ToString[primorial[n]],ToString[n]]],{n,1,100}] SequenceCount[IntegerDigits[#[[1]]],IntegerDigits[#[[2]]]]&/@With[ {nn=90}, Thread[ {FoldList[ Times,Prime[Range[nn]]],Range[nn]}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 16 2017 *)
Formula
a(A275450(n)) > 0.