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.

Showing 1-7 of 7 results.

A035239 Smallest number that contains the numbers from 1 to n as substrings.

Original entry on oeis.org

1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 1023456789, 11023456789, 101123456789, 1011213456789, 10112131456789, 101121314156789, 1011213141516789, 10112131415161789, 101121314151617189
Offset: 1

Views

Author

Keywords

Crossrefs

Extensions

Keyword base added by Reinhard Zumkeller, May 16 2010

A054260 Smallest prime that contains all of the first n primes as substrings.

Original entry on oeis.org

2, 23, 523, 2357, 112573, 511327, 1135217, 1113251719, 11171323519, 113171952923, 113171952923, 11131951723729, 11317237419529, 1131723294375419, 113172329541947437, 1131723294195343747, 1113172329419434753759
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Comments

The 10th and 11th terms are identical because the smallest prime containing all primes through 29 as substrings also happens to include 31. - Jon E. Schoenfield, Sep 10 2006

Crossrefs

Extensions

More terms from Jon E. Schoenfield, Sep 10 2006, corrected Oct 01 2006

A240959 Smallest number that contains the first n primes as substrings. Substrings can go from left to right or right to left.

Original entry on oeis.org

2, 23, 235, 2357, 112357, 113257, 231175, 11325719, 11325719, 11329175, 11329175, 113291735, 3117329145, 11329143715, 411329173475, 3114329173547, 31143291735947, 1132914347167359, 1132914347167359, 1132914347167359, 1132914347167359, 11329143471673597
Offset: 1

Views

Author

Dmitry Kamenetsky, Aug 04 2014

Keywords

Comments

In this version substrings can go from left to right or right to left. The version that only allows substrings to go from left to right is A054261.

Examples

			a(7) = 231175, because 231175 is the smallest number that contains the first 7 primes as substrings: 2, 3, 5, 7, 11 and 13. Note that number 13 is contained from right to left.
		

Crossrefs

Cf. A054261.

Programs

  • PARI
    allss(d, ss, nbc) = {for (i=1, nbc, for (j=1, #d -i +1, subd = []; subd = concat(subd, d[j]); for (k=1, i-1, subd = concat(subd, d[j+k]);); ss = vecsort(concat(ss, subst(Pol(subd), x, 10)),,8););); return (ss);}
    isoks(k, n, vp) = {nbc = #Str(prime(n)); d = digits(k); sd = vecsort(d,, 8); for (j=1, #vp, if (!vecsearch(sd, vp[j]), return(0));); ss = []; if (#d < nbc, return(0)); ss = allss(d, ss, nbc); rd = vector(#d, i, d[#d - i +1]); ss = allss(rd, ss, nbc); for (i=1, n, if (! vecsearch (ss, prime(i)), return (0));); return (1);}
    a(n) = {vp = []; for (i=1, n, dp = digits(prime(i)); for (k=1, #dp, vp = vecsort(concat(vp, dp[k]), ,8););); k = subst(Pol(vp), x, 10); while (!isoks(k, n, vp), k++); k;} \\ Michel Marcus, Aug 28 2014

Formula

a(n) = A054261(n) for n=1 to 6.

Extensions

The author says he is not 100% certain that the later terms are correct, and would appreciate an independent verification. - N. J. A. Sloane, Sep 04 2014

A295708 Numbers n such that prime(n) contains a substring of all the prime digits in order, i.e., "2357".

Original entry on oeis.org

350, 8919, 13213, 15699, 18175, 19909, 20623, 20886, 20887, 20888, 20889, 20890, 20891, 20892, 21416, 27890, 30161, 30935, 32471, 43332, 43333, 43334, 46246, 47005, 48517, 52993, 53745, 57484, 64129, 65688, 70729, 71446, 72909, 72998, 73639, 77949, 80241, 80242
Offset: 1

Views

Author

K. D. Bajpai, Nov 26 2017

Keywords

Comments

12941584 is the least integer m with more than one "2357" substring in prime(m).

Examples

			8919 is in the sequence because prime(8919) = 92357 contains a substring of prime digits "2357".
27890 is in the sequence because prime(27980) = 323579 contains a substring of prime digits "2357".
		

Crossrefs

Programs

  • Maple
    F:= proc(d) local x,y,j;
      op(map(numtheory:-pi,sort(convert(select(isprime, {seq(seq(seq(x+10^j*2357+10^(j+4)*y, y=10^(d-j-5)..10^(d-j-4)-1),x=1..10^j-1,2),j=1..d-5),
    seq(10^(d-4)*2357+x,x=1..10^(d-4)-1),seq(10^4*x+2357,x=10^(d-5)..10^(d-4)-1)}),list))));
    end proc:
    350, seq(F(d),d=5..7); # Robert Israel, Nov 29 2017
  • Mathematica
    Select[Range[100000], MemberQ[Partition[IntegerDigits[Prime[#]], 4, 1], {2, 3, 5, 7}] &]
  • PARI
    isok(n)=p = prime(n); ret = 0; while (p > 1, if ((p % 10000) == 2357, ret = 1; break); p = floor(p/10);); return (ret); \\ Michel Marcus, Dec 15 2017

Formula

a(n) ~ n. - Charles R Greathouse IV, Dec 28 2017

A173716 Smallest number that contains the first n semiprimes as substrings.

Original entry on oeis.org

4, 46, 469, 10469, 101469, 10141569, 101421569, 1014221569, 101421522569, 1014215225269, 101421522526339, 1014215225263349, 101421522526334359, 10142152252633435389, 101421522526334353839, 1014215225263346353839
Offset: 1

Views

Author

N. J. A. Sloane, Nov 25 2010

Keywords

Comments

Semiprime analog of A054261.

References

  • Jonathan Vos Post, Posting to the Sequence Fans Mailing List, May 24 2010

Crossrefs

Extensions

More terms from Sean A. Irvine, Dec 02 2010

A263404 Smallest square containing the first n primes as substrings.

Original entry on oeis.org

25, 324, 3025, 35721, 11730625, 71132356, 1132591716, 17136119025, 1923311317225, 58191311792329, 58191311792329, 231372178511929, 1722376411319529, 1134152319174379129, 472643754131992311729, 17298113195343723473641, 419723711317595314724329, 4319231361106417537475929
Offset: 1

Views

Author

Emmanuel Vantieghem, Oct 17 2015

Keywords

Comments

The sequence is infinite.

Examples

			a(6) = 71132356 = 8464^2 contains 2, 3, 5, 7, 11 and 13 as substrings and no smaller square has that property.
		

Crossrefs

Programs

  • Mathematica
    Do[k = 1; While[! AllTrue[Prime@ Range@ n, StringContainsQ[ToString[k^2], ToString@ #] &], k++]; Print[k^2], {n, 9}] (* Michael De Vlieger, Oct 19 2015, Version 10 *)

Extensions

a(15)-a(16) from Bert Dobbelaere, Oct 28 2018
a(17)-a(18) from Giovanni Resta, Aug 27 2019

A309706 Smallest number that contains the first n primes as substrings in base 10. Substrings go from left to right, but numbers in the substrings can be separated by several numbers.

Original entry on oeis.org

2, 23, 235, 2357, 112357, 112357, 112357, 1123579, 1123579, 1123579, 1231579, 1231579, 12341579, 12431579, 12431579, 12453179, 12453179, 124536179, 124536179, 1124536719, 1234567139, 1234567139, 12345671839, 12345671839, 12456783197, 102456783197, 102456783197, 102456783197
Offset: 1

Views

Author

Vincent Champain, Aug 28 2019

Keywords

Comments

The version with subsequences of contiguous numbers is A054261.
The sequence is nondecreasing, by definition.

Examples

			The series starts as A054261, but 112357 is followed by 112357 because 13 can be obtained with a subsequence '1','3' which is interrupted by '2'.
		

Crossrefs

Formula

a(n) <= A054261(n). - David A. Corneth, Aug 28 2019

Extensions

a(11)-a(28) from David A. Corneth, Aug 28 2019
Showing 1-7 of 7 results.