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-2 of 2 results.

A048553 a(n+1) is next smallest prime beginning with a(n), initial prime is 11.

Original entry on oeis.org

11, 113, 11311, 113111, 1131113, 11311133, 1131113353, 113111335313, 11311133531339, 113111335313399, 1131113353133993, 113111335313399321, 11311133531339932153, 1131113353133993215379, 113111335313399321537911
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n)
      local p, d;
      for d from 1 do
        p:= nextprime(n*10^d);
        if p < (n+1)*10^d then return p fi
      od
    end proc:
    A[1]:= 11:
    for n from 2 to 20 do A[n]:= f(A[n-1]) od:
    seq(A[n], n=1..20); # Robert Israel, Aug 16 2015
  • Mathematica
    a = {11}; Do[k = 1; w = IntegerDigits[a[[n - 1]]];
    While[CompositeQ@ FromDigits[Join[w, IntegerDigits@ k]], k += 2];
    AppendTo[a, FromDigits[Join[w, IntegerDigits@ k]]], {n, 2, 15}]; a (* Michael De Vlieger, Sep 21 2015 *)

A261269 Minimal prime concatenation sequence with base 2 and seed 11.

Original entry on oeis.org

11, 111, 11101, 111011, 11101111, 111011111, 111011111001, 111011111001111, 1110111110011111, 11101111100111110101, 1110111110011111010101, 11101111100111110101010101, 11101111100111110101010101011, 1110111110011111010101010101111
Offset: 1

Views

Author

Clark Kimberling, Sep 16 2015

Keywords

Examples

			In base 2, the least prime starting with seed 1 is 11; the least prime starting with 11 is 111; the least prime starting with 111 is 11101. Triangular format:
11
111
11101
111011
11101111
1110111111
111011111001
		

Crossrefs

Cf. A261270.

Programs

  • Mathematica
    b = 2; s = {{1}};
    Do[NestWhile[# + 1 &, 0, ! (PrimeQ[FromDigits[tmp = Join[Last[s], (nn = #;           IntegerDigits[nn - Sum[b^n, {n, l = NestWhile[# + 1 &, 1, ! (nn - (Sum[b^n, {n, #}]) < 0) &] - 1}], b, l + 1])], b]]) &];
    AppendTo[s, tmp], {30}]; Map[FromDigits, s]
    Map[FromDigits, s] (* A261269 *)
    Map[FromDigits[#, b] &, s] (* A261270 *)
    (* Peter J. C. Moses, Aug 06 2015 *)
Showing 1-2 of 2 results.