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.

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

This page as a plain text file.
%I A046256 #19 Jun 08 2021 09:23:08
%S A046256 6,7,7,9,27,59,69,181,201,257,267,399,573,603,861,901,923,1021,1133,
%T A046256 1239,1251,1519,1589,1729,1863,1901,2541,3001,3017,3049,3243,4407,
%U A046256 4481,5457,5839,5889,5919,6159,6201,6293,6577,6603,6969,7217,8131,8981,9033
%N A046256 a(1) = 6; a(n) is smallest number >= a(n-1) such that the juxtaposition a(1)a(2)...a(n) is a prime.
%H A046256 Michael S. Branicky, <a href="/A046256/b046256.txt">Table of n, a(n) for n = 1..441</a> (terms 1..100 from Harvey P. Dale)
%t A046256 a[1] = 6; 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 *)
%t A046256 nxt[{j_,a_}]:=Module[{k=a},While[!PrimeQ[j*10^IntegerLength[k]+k], k++];{j*10^IntegerLength[k]+k,k}]; Transpose[NestList[nxt,{6,6},50]][[2]] (* _Harvey P. Dale_, May 07 2016 *)
%o A046256 (Python)
%o A046256 from sympy import isprime
%o A046256 def aupton(terms):
%o A046256   alst, astr = [6], "6"
%o A046256   for n in range(2, terms+1):
%o A046256     an = alst[-1]
%o A046256     while not isprime(int(astr+str(an))): an += 1
%o A046256     alst, astr = alst + [an], astr + str(an)
%o A046256   return alst
%o A046256 print(aupton(62)) # _Michael S. Branicky_, Jun 07 2021
%Y A046256 Cf. A069608, A074342, A033680, A033679, A033681, A046254, A046255, A046257, A046258, A046259, A111524.
%K A046256 nonn,base
%O A046256 1,1
%A A046256 _Patrick De Geest_, May 15 1998