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.

A236528 Start with 4; thereafter, primes obtained by concatenating to the end of previous term the next smallest number that will produce a prime.

This page as a plain text file.
%I A236528 #19 May 22 2025 10:21:36
%S A236528 4,41,419,41911,4191119,41911193,419111933,41911193341,4191119334151,
%T A236528 419111933415151,41911193341515187,4191119334151518719,
%U A236528 419111933415151871963,41911193341515187196323,4191119334151518719632313,419111933415151871963231329
%N A236528 Start with 4; thereafter, primes obtained by concatenating to the end of previous term the next smallest number that will produce a prime.
%C A236528 a(n+1) is the next smallest prime beginning with a(n). Initial term is 4.
%C A236528 After a(1), these are the primes arising in A069606.
%e A236528 a(1) = 4 by definition.
%e A236528 a(2) is the next smallest prime beginning with 4, so a(2) = 41.
%e A236528 a(3) is the next smallest prime beginning with 41, so a(3) = 419.
%e A236528 ...and so on.
%t A236528 NestList[Module[{k=1},While[!PrimeQ[#*10^IntegerLength[k]+k],k+=2];#*10^IntegerLength[k]+ k]&,4,20] (* _Harvey P. Dale_, Jul 20 2024 *)
%o A236528 (Python)
%o A236528 import sympy
%o A236528 from sympy import isprime
%o A236528 def b(x):
%o A236528   num = str(x)
%o A236528   n = 1
%o A236528   while n < 10**3:
%o A236528     new_num = str(x) + str(n)
%o A236528     if isprime(int(new_num)):
%o A236528       print(int(new_num))
%o A236528       x = new_num
%o A236528       n = 1
%o A236528     else:
%o A236528       n += 1
%o A236528 b(4)
%Y A236528 Cf. A110773, A048553, A069606.
%K A236528 nonn,base
%O A236528 1,1
%A A236528 _Derek Orr_, Jan 27 2014