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-10 of 15 results. Next

A069614 a(1) = 2; a(2n) = smallest prime starting (the most significant digits) with a(2n-1) (i.e., as a right concatenation of a(2n-1) and a number with no insignificant zeros); a(2n+1) = smallest prime ending in (the least significant digits) a(2n-1). Alternate left and right concatenation yielding primes.

Original entry on oeis.org

2, 23, 223, 2237, 32237, 3223729, 63223729, 632237297, 2632237297, 263223729721, 12263223729721, 1226322372972173, 171226322372972173, 17122632237297217381, 2117122632237297217381, 21171226322372972173813
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Examples

			a(4) = 2111 starting with a(3) = 211 and a(5) = 22111 ending in a(4) = 2111.
		

Crossrefs

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

A053583 a(n+1) is the smallest prime ending with (but not equal to) a(n), where a(1)=3.

Original entry on oeis.org

3, 13, 113, 2113, 12113, 612113, 11612113, 1611612113, 111611612113, 1111611612113, 81111611612113, 2181111611612113, 132181111611612113, 11132181111611612113, 3411132181111611612113, 413411132181111611612113, 12413411132181111611612113
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 18 2000

Keywords

Crossrefs

Programs

  • Maple
    A[1]:= 3;
    for n from 2 to 100 do
    d:= 10^(ilog10(A[n-1])+1);
    for k from 1 do
      p:= A[n-1]+d*k;
      if isprime(p) then
        A[n]:= p;
        break
      fi
    od
    od:
    seq(A[n],n=1..100); # Robert Israel, Jul 15 2014
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(an=3):
        while True:
            yield an
            pow10 = 10**len(str(an))
            for t in count(pow10+an, step=pow10):
                if isprime(t):
                    an = t
                    break
    print(list(islice(agen(), 17))) # Michael S. Branicky, Jun 23 2022

Extensions

Definition corrected by Robert Israel, Jul 15 2014

A069621 a(1) = 9; a(2n) = smallest prime that is a right concatenation of a(2n-1) and a number with no insignificant zeros and a(2n+1) = smallest prime ending in ( the least significant digits) a(2n). Alternate left and right concatenation yielding primes.

Original entry on oeis.org

9, 97, 197, 1973, 31973, 319733, 3319733, 331973311, 6331973311, 633197331131, 5633197331131, 563319733113127, 6563319733113127, 65633197331131279, 3465633197331131279, 346563319733113127933, 18346563319733113127933
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Examples

			a(4) = 1973 starting with a(3) =197 and a(5) = 31973 ending in a(4) = 1973.
		

Crossrefs

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

A069613 a(1) = 1; a(2n) is smallest prime starting with a(2n-1) and a number with no insignificant zeros, and a(2n+1) is smallest prime ending in a(2n-1). Alternate left and right concatenation yielding primes.

Original entry on oeis.org

1, 11, 211, 2111, 22111, 2211127, 12211127, 122111279, 14122111279, 1412211127927, 211412211127927, 21141221112792721, 1321141221112792721, 132114122111279272169, 27132114122111279272169, 2713211412211127927216947
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Comments

a(6) is not 2211109 because the 0 in this number is considered insignificant (for comparison, the 0 in 22111109 would be significant, but this value is not the smallest possible extension of a(5)=22111). - Sean A. Irvine, May 07 2024

Examples

			a(4) = 2111 starting with a(3) =211 and a(5) = 22111 ending in a(4) = 2111.
		

Crossrefs

Extensions

More terms from Robert Gerbicz, Aug 27 2002
Name clarified by Sean A. Irvine, May 07 2024

A069615 a(1) = 3; a(2n) = smallest prime starting (in the most significant digits) with a(2n-1) (i.e., as a right concatenation of a(2n-1) and a number with no insignificant zeros); a(2n+1) = smallest prime ending in (the least significant digits) a(2n-1). Alternate left and right concatenation yielding primes.

Original entry on oeis.org

3, 31, 131, 1319, 21319, 213193, 12213193, 122131939, 1122131939, 112213193957, 27112213193957, 271122131939573, 3271122131939573, 327112213193957339, 2327112213193957339, 232711221319395733969, 13232711221319395733969
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Examples

			a(4) = 1319 starting with a(3) = 131 and a(5) = 21319 ending in a(4) = 1319.
		

Crossrefs

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

A053584 a(n+1) is the smallest prime ending with a(n), where a(1)=7.

Original entry on oeis.org

7, 17, 317, 6317, 26317, 126317, 2126317, 72126317, 372126317, 5372126317, 125372126317, 15125372126317, 415125372126317, 23415125372126317, 2223415125372126317, 152223415125372126317, 21152223415125372126317, 4221152223415125372126317
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 18 2000

Keywords

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(an=7):
        while True:
            yield an
            pow10 = 10**len(str(an))
            for t in count(pow10+an, step=pow10):
                if isprime(t):
                    an = t
                    break
    print(list(islice(agen(), 18))) # Michael S. Branicky, Jun 23 2022

A069612 a(1) = 19 (the smallest prime ending in a 9) and a(n+1) = smallest prime ending in a(n).

Original entry on oeis.org

19, 419, 5419, 35419, 435419, 11435419, 111435419, 9111435419, 89111435419, 1389111435419, 81389111435419, 381389111435419, 15381389111435419, 3315381389111435419, 153315381389111435419, 22153315381389111435419, 2022153315381389111435419
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Crossrefs

Programs

  • Mathematica
    w=9; Table[w; i=1; While[PrimeQ[ToExpression[StringJoin[ToString[i], ToString[w]]]]==False, i++ ]; w=ToExpression[StringJoin[ToString[i], ToString[w]]], {32}]
    nxt[n_]:=Module[{c=10^IntegerLength[n],x=1},While[!PrimeQ[c*x+n],x++];c*x+n]; NestList[nxt,19,15] (* Harvey P. Dale, Sep 25 2013 *)
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(an=19):
        while True:
            yield an
            pow10 = 10**len(str(an))
            for t in count(pow10+an, step=pow10):
                if isprime(t):
                    an = t
                    break
    print(list(islice(agen(), 17))) # Michael S. Branicky, Jun 23 2022

Extensions

More terms from Hans Havermann, Jun 06 2002

A069616 a(1) = 4; a(2n) = smallest prime that is a right concatenation of a(2n-1) and a number with no insignificant zeros and a(2n+1) = smallest prime ending in ( the least significant digits) a(2n-1). Alternate left and right concatenation yielding primes.

Original entry on oeis.org

4, 41, 241, 2411, 32411, 324113, 6324113, 63241133, 1563241133, 15632411339, 815632411339, 81563241133919, 281563241133919, 2815632411339191, 322815632411339191, 32281563241133919151, 432281563241133919151
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Examples

			a(4) = 2411 starting with a(3) =241 and a(5) = 32411 ending in a(4) = 2411.
		

Crossrefs

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

A069617 a(1) = 5; a(2n) = smallest prime that is a right concatenation of a(2n-1) and a number with no insignificant zeros and a(2n+1) = smallest prime ending in ( the least significant digits) a(2n-1). Alternate left and right concatenation yielding primes.

Original entry on oeis.org

5, 53, 353, 3533, 33533, 3353321, 113353321, 1133533213, 101133533213, 10113353321311, 310113353321311, 3101133533213117, 143101133533213117, 14310113353321311739, 314310113353321311739, 314310113353321311739103
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Examples

			a(4) = 3533 starting with a(3) = 353 and a(5) = 33533 ending in a(4) = 3533.
		

Crossrefs

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 30 2003

A077714 a(1) = 1; thereafter a(n) = the smallest prime of the form d0...0a(n-1), where d is a single digit, or 0 if no such prime exists.

Original entry on oeis.org

1, 11, 211, 4211, 34211, 234211, 4234211, 304234211, 9304234211, 209304234211, 7209304234211, 37209304234211, 3037209304234211, 23037209304234211, 323037209304234211, 70000323037209304234211, 300070000323037209304234211, 600300070000323037209304234211
Offset: 1

Views

Author

Amarnath Murthy, Nov 19 2002

Keywords

Comments

a(n) is the smallest prime obtained by prefixing a(n-1) with a number of the form d*10^k where d is a single digit, 0 < d < 10, and k >= 0. Conjecture: d*10^k always exists.

Examples

			a(8) = 304234211; deleting 3 gives 4234211 = a(7).
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k, m, d, p;
          if n=1 then 1 else k:= a(n-1);
            for m from length(k) do
              for d to 9 do p:= k +d*10^m;
                if isprime(p) then return p fi
            od od
          fi
        end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Jan 12 2015
  • Python
    from sympy import isprime
    from itertools import islice
    def agen(an=1):
        while True:
            yield an
            pow10 = 10**len(str(an))
            while True:
                found = False
                for t in range(pow10+an, 10*pow10+an, pow10):
                    if isprime(t):
                        an = t; found = True; break
                if found: break
                pow10 *= 10
    print(list(islice(agen(), 18))) # Michael S. Branicky, Jun 23 2022

Extensions

More terms from Ray Chandler, Jul 23 2003
Offset changed to 1 by Alois P. Heinz, Jan 12 2015
Definition clarified by N. J. A. Sloane, Jan 19 2015
Showing 1-10 of 15 results. Next