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.

A156119 Primes formed by rearranging five consecutive decimal digits (avoiding leading 0).

This page as a plain text file.
%I A156119 #15 Mar 01 2023 14:28:30
%S A156119 10243,12043,20143,20341,20431,23041,24103,25463,25643,30241,32401,
%T A156119 36457,40123,40213,40231,41023,41203,42013,43201,45263,45673,45763,
%U A156119 46523,46573,47563,47653,54367,54623,54673,56437,56473,56897,57689,58679,58967,65423
%N A156119 Primes formed by rearranging five consecutive decimal digits (avoiding leading 0).
%C A156119 No primes can be formed from {1,2,3,4,5} or {4,5,6,7,8} since they are divisible by three.
%C A156119 Sequence is finite, ending with a(52)=96857.
%H A156119 Nathaniel Johnston, <a href="/A156119/b156119.txt">Table of n, a(n) for n = 1..52</a> (full sequence)
%p A156119 A156119:={}: for s from 0 to 5 do l:=combinat[permute]([$(s..(s+4))]): for k from 1 to 120 do if(k>=25 or s>=1)then n:=add(10^(5-j)*l[k][j],j=1..5): if(isprime(n))then A156119 := A156119 union {n}: fi: fi: od: od: op(A156119); # _Nathaniel Johnston_, Jun 23 2011
%t A156119 Flatten[Table[Select[FromDigits/@Permutations[Range[n,n+4]],IntegerLength[#]==5 && PrimeQ[#]&],{n,0,5}]]//Sort (* _Harvey P. Dale_, Mar 01 2023 *)
%Y A156119 Cf. A177119.
%K A156119 nonn,base,easy,fini,full
%O A156119 1,1
%A A156119 _Ki Punches_, Feb 14 2009
%E A156119 Edited and extended by _Ray Chandler_, Feb 16 2009