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

A048549 a(n+1) is next smallest prime beginning with a(n), initial prime is 2.

Original entry on oeis.org

2, 23, 233, 2333, 23333, 2333321, 233332117, 2333321173, 233332117313, 23333211731399, 2333321173139903, 2333321173139903173, 23333211731399031733, 2333321173139903173301, 2333321173139903173301021
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Similar to but different from A069603.

Programs

  • Mathematica
    b = 10; s = {{2}};
    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], {20}]; Map[FromDigits, s] (* Peter J. C. Moses, Aug 06 2015 *)

A048556 p(n+1) is next smallest prime beginning with p(n), initial prime is 19.

Original entry on oeis.org

19, 191, 1913, 19139, 1913903, 19139039, 191390393, 19139039303, 1913903930321, 191390393032123, 1913903930321233, 191390393032123361, 19139039303212336171, 1913903930321233617139, 191390393032123361713943
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

A048552 a(n+1) is next smallest prime beginning with a(n), initial prime is a(0) = 7.

Original entry on oeis.org

7, 71, 719, 7193, 71933, 719333, 71933317, 719333177, 71933317711, 7193331771103, 71933317711039, 7193331771103939, 719333177110393913, 7193331771103939133, 719333177110393913323, 71933317711039391332309, 719333177110393913323097, 719333177110393913323097047
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local q,d,v;
        q:=procname(n-1);
        for d from 1 do
          v:= nextprime(q*10^d);
          if v < (q+1)*10^d then return v fi
        od
    end proc:
    f(0):= 7:
    map(f, [$0..20]); # Robert Israel, Jan 26 2020
  • Mathematica
    Nest[Function[{a, n}, Append[#, Catch@ Do[Do[If[PrimeQ@ #, Throw@ #; Break[], #] &@ FromDigits[n~Join~PadLeft[IntegerDigits[(5 j - 4 + Mod[3 j + 2, 4])/2], i]], {j, 4*10^(i - 1)}], {i, Infinity}]]] @@ {#, IntegerDigits[#[[-1]] ]} &, {7}, 17] (* Michael De Vlieger, Jan 26 2020 *)
  • PARI
    next_A048552(p)=for(i=1,oo,my(q=nextprime(p*=10));q-p>10^i||return(q))
    A048552(n,p=7)=vector(n,i,i>1&&p=next_A048552(p);p) \\ M. F. Hasler, Jan 26 2020

A048550 a(n+1) is the next smallest prime beginning with a(n), initial prime is 3.

Original entry on oeis.org

3, 31, 311, 3119, 31193, 3119309, 31193093, 311930933, 31193093317, 311930933179, 3119309331797, 311930933179703, 31193093317970371, 3119309331797037107, 311930933179703710759, 31193093317970371075907
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local d,a;
      for d from 1 do
        for a from 10^d*n+1 by 2 to 10^d*(n+1) do
          if isprime(a) then return a fi
      od od
    end proc:
    R:= 3: x:= 3:
    for i from 2 to 30 do
      x:= f(x);
      R:= R, x;
    od:
    R; # Robert Israel, Dec 13 2023
Showing 1-4 of 4 results.