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.

A046258 a(1) = 8; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.

Original entry on oeis.org

8, 9, 23, 51, 69, 81, 93, 129, 169, 179, 181, 273, 321, 321, 449, 639, 769, 857, 1047, 1213, 1233, 1443, 1587, 1637, 1953, 2433, 2599, 2639, 2901, 3261, 3681, 4059, 5109, 5169, 5407, 5691, 6149, 6531, 7939, 8081, 8211, 8439, 8589, 8623, 8663, 8757, 9459
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Maple
    A[1]:= 8: A[2]:= 9: x:= 89:
    for n from 3 to 100 do
      for y from A[n-1] by 2 do
        z:= x*10^(1+ilog10(y))+y;
        if isprime(z) then break fi;
      od:
      A[n]:= y;
      x:= z;
    od:
    seq(A[i],i=1..100); # Robert Israel, May 30 2018
  • Mathematica
    a[1] = 8; a[n_] := a[n] = Block[{k = a[n - 1], c = IntegerDigits @ Table[ a[i], {i, n - 1}]}, While[ !PrimeQ[ FromDigits @ Flatten @ Append[c, IntegerDigits[k]]], k ++ ]; k]; Table[ a[n], {n, 47}] (* Robert G. Wilson v, Aug 05 2005 *)
    nxt[{jp_,a_}]:=Module[{k=a},While[CompositeQ[jp 10^IntegerLength[k]+k],k++];{jp 10^IntegerLength[k]+ k,k}]; NestList[nxt,{8,8},50][[;;,2]] (* Harvey P. Dale, Apr 10 2024 *)