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.

Original entry on oeis.org

2, 3, 11, 13, 157, 8209, 31231, 1608697, 112328569, 10247900863, 21926946241, 1256492087941, 101017938127207, 10019534732186179, 103820246231814111793, 6892441533761699205127, 125403143123000002762783, 1008021783580817338005763
Offset: 0

Views

Author

Lekraj Beedassy, Apr 14 2005

Keywords

Examples

			a(1) = 3 because 131 is prime.
a(2) = 11 since 1111 = 11*101.
a(3) = 13 because 1131 = 3*13*29.
a(4) = 157 since 11571 = 3*7*19*29.
a(5) = 8209 since 182091 = 3*7*13*23*29.
a(6) = 31231 since 1312311 = 3*7*11*13*19*23.
		

Crossrefs

Cf. A069687.

Programs

  • Mathematica
    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 *)
    (* 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}]

Extensions

Extended by Robert G. Wilson v, Apr 16 2005