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.
%I A386842 #32 Aug 14 2025 23:08:51 %S A386842 13,131,3079,31307,130211,6006047,65770459,2174896369,123463673149, %T A386842 7326324078721 %N A386842 a(n) is the smallest prime number p in a sequence of n consecutive primes, such that the numbers formed by the last n digits of each prime in the sequence create another sequence of n consecutive prime numbers, all strictly less than p. %H A386842 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_1229.htm">Puzzle 1229. Set of consecutive primes such that...</a>, The Prime Puzzles & Problems Connection. %e A386842 a(2) = 131, because it is the smallest prime p such that there exists a sequence of 2 consecutive primes (131, 137), and the last 2 digits of each prime (31 and 37) are themselves consecutive prime numbers less than p. %e A386842 1 [13] -> ending with 1 digit [3] (both consecutive primes) %e A386842 2 [131, 137] -> ending with 2 digits [31, 37] (both consecutive primes) %e A386842 3 [3079, 3083, 3089] -> ending with 3 digits [79, 83, 89] (both consecutive primes) %e A386842 4 [31307, 31319, 31321, 31327] -> ending with 4 digits [1307, 1319, 1321, 1327] (both consecutive primes) %o A386842 (PARI) a(n)={my(m=10^n,c=0,q,r); forprime(p=m, oo, if(!isprime(p%m), c=0, if(c&&nextprime(q%m+1)==p%m, c++, c=1;r=p); if(c==n, return(r)); q=p ))} \\ _Andrew Howroyd_, Aug 09 2025 %Y A386842 Cf. A000040, A024785. %K A386842 base,nonn,more %O A386842 1,1 %A A386842 _Jean-Marc Rebert_, Aug 05 2025