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 A177119 #44 Jun 20 2023 18:57:39 %S A177119 2,3,5,7,23,43,67,89,1423,2143,2341,2543,4231,4253,4523,4567,4657, %T A177119 5647,5867,6547,6857,10243,12043,20143,20341,20431,23041,24103,25463, %U A177119 25643,30241,32401,36457,40123,40213,40231,41023,41203,42013,43201,45263,45673,45763 %N A177119 Primes whose digits can be arranged as consecutive digits (more precisely, to form a substring of 0123456789). %C A177119 These are the primes whose digits can be permuted to give a substring of 0123456789. %C A177119 This sequence has exactly 6744 terms, none of which are 3-digit, 6-digit, 9-digit, or 10-digit numbers because these are all divisible by 3. The last term is 98745623. - _Chris K. Caldwell_ %H A177119 Nathaniel Johnston, <a href="/A177119/b177119.txt">Table of n, a(n) for n = 1..6744</a> (full sequence) %H A177119 G. L. Honaker, Jr. and Chris Caldwell, <a href="https://t5k.org/curios/cpage/22862.html">Prime Curios! 2543</a> %e A177119 a(12)=2543 can be arranged as 2345. %e A177119 109 is not a term since 019 is not a substring of 0123456789. %p A177119 A177119:={}: for d from 1 to 5 do for s from 0 to 10-d do l:=combinat[permute]([$(s..(s+d-1))]): for k from 1 to d! do n:=add(10^(d-j)*l[k][j],j=1..d): if(isprime(n))then A177119 := A177119 union {n}: fi: od: od: od: op(A177119); # _Nathaniel Johnston_, Jun 23 2011 %t A177119 (* computes all terms *) Reap[Do[p=Prime[n]; If[p<10 || Union[Differences[Sort[IntegerDigits[p]]]] == {1}, Sow[p]], {n, PrimePi[98765432]}]][[2, 1]] (* _T. D. Noe_, Dec 10 2010 *) %t A177119 lst = {}; Do[AppendTo[lst, Select[FromDigits /@ Permutations@Range[n, d + n - 1], PrimeQ[#] &]], {d, 5}, {n, 0, 10 - d}]; Union@Flatten[lst] (* _Arkadiusz Wesolowski_, Jan 07 2013 *) %t A177119 Join[{2,3,5,7},Select[Prime[Range[57*10^5]],Union[Differences[Sort[IntegerDigits[#]]]]=={1}&]] (* _Harvey P. Dale_, Jun 20 2023 *) %Y A177119 Cf. A000040, A001477, A156119. See A068710 for a different (and presumably infinite) version. %K A177119 nonn,easy,fini,full,base %O A177119 1,1 %A A177119 _G. L. Honaker, Jr._, Dec 09 2010 %E A177119 Extended by _Chris K. Caldwell_ %E A177119 Edited by _N. J. A. Sloane_, Jan 22 2011