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.

A105226 Smallest prime p such that the number represented by the decimal string 1p1 is a product of n distinct primes.

This page as a plain text file.
%I A105226 #9 Jul 31 2015 02:26:32
%S A105226 2,3,11,13,157,8209,31231,1608697,112328569,10247900863,21926946241,
%T A105226 1256492087941,101017938127207,10019534732186179,
%U A105226 103820246231814111793,6892441533761699205127,125403143123000002762783,1008021783580817338005763
%N A105226 Smallest prime p such that the number represented by the decimal string 1p1 is a product of n distinct primes.
%e A105226 a(1) = 3 because 131 is prime.
%e A105226 a(2) = 11 since 1111 = 11*101.
%e A105226 a(3) = 13 because 1131 = 3*13*29.
%e A105226 a(4) = 157 since 11571 = 3*7*19*29.
%e A105226 a(5) = 8209 since 182091 = 3*7*13*23*29.
%e A105226 a(6) = 31231 since 1312311 = 3*7*11*13*19*23.
%t A105226 pf[n_] := Flatten[ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger[n]]; t = Table[0, {9}]; Do[ a = pf[ FromDigits[ Join[{1}, IntegerDigits[ Prime[n]], {1}]]]; If[a == Union[a], l = Length[a]; If[ t[[l]] == 0, t[[l]] = Prime[n]]], {n, 10^7}] (* also for n>2 I used *) (* _Robert G. Wilson v_, Apr 16 2005 *)
%t A105226 (* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) Table[ FromDigits[ Take[ IntegerDigits[ Select[ Sort[ Times @@@ KSubsets[ Drop[ Prime[ Range[25]], {1, 3, 2}], n]], Take[ RotateRight[ IntegerDigits[ # ]], 2] == {1, 1} && IntegerDigits[ # ][[2]] != 0 && PrimeQ[ FromDigits[ Drop[ RotateRight[ IntegerDigits[ # ]], 2]]] &][[1]]], {2, -2}]], {n, 3, 20}]
%Y A105226 Cf. A069687.
%K A105226 nonn,base
%O A105226 0,1
%A A105226 _Lekraj Beedassy_, Apr 14 2005
%E A105226 Extended by _Robert G. Wilson v_, Apr 16 2005