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.

A046257 a(1) = 7; 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

7, 9, 19, 27, 47, 57, 61, 81, 179, 211, 251, 273, 373, 477, 581, 753, 847, 909, 909, 939, 957, 1173, 1311, 1343, 1543, 1619, 1693, 1739, 1879, 1971, 2141, 2523, 2653, 2729, 2863, 3201, 3293, 3411, 3621, 3753, 5023, 5421, 5459, 5481, 6403, 6827, 7041, 7669
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

All terms must be odd. - Harvey P. Dale, Oct 21 2023

Crossrefs

Programs

  • Maple
    A:= 7: x:= 7: count:= 1:
    for i from 7 by 2 while count < 10000 do
     while isprime(x*10^(1+ilog10(i))+i) do
       x:= x*10^(1+ilog10(i))+i; A:= A,i; count:= count+1;
    od od:
    A; # Robert Israel, Jan 21 2024
  • Mathematica
    a[1] = 7; 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 += 2]; k]; Table[ a[n], {n, 46}] (* Robert G. Wilson v, Aug 05 2005 *)
    nxt[{j_,a_}]:=Module[{k=a},While[CompositeQ[j*10^IntegerLength[k]+k],k+=2];{j*10^IntegerLength[k]+k,k}]; NestList[nxt,{7,7},50][[;;,2]] (* Harvey P. Dale, Oct 21 2023 *)