login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A295206 Number of primes that are permutations of the first 3*n - 2 numbers. 1

%I #28 Jan 12 2018 05:55:39

%S 0,4,534,222864,284197799

%N Number of primes that are permutations of the first 3*n - 2 numbers.

%C The sequence would be a concatenation of chunks of the form {x, 0, 0}, where x is a value greater than zero, apart from the first term. Here only x's are listed.

%e a(2) = 4 because for the first 4 numbers {1,2,3,4} we have 1423, 2143, 2341, 4231 that are prime.

%p with(combinat): P:=proc(q) local a,b,j,k,n,t; a:=[];

%p for n from 1 to q do a:=permute(3*n-2); t:=0;

%p for k from 1 to nops(a) do b:=0;

%p for j from 1 to nops(a[k]) do b:=10^(ilog10(a[k][j])+1)*b+a[k][j]; od;

%p if isprime(b) then t:=t+1; fi; od; print(t);

%p od; end: P(5); # _Paolo P. Lava_, Nov 17 2017

%t Array[Count[Map[FromDigits@ Flatten[IntegerDigits@ #] &, Permutations[Range@ #, {#}]], _?PrimeQ] &, 10] (* _Michael De Vlieger_, Nov 17 2017 *)

%Y Cf. A000040, A175429.

%K nonn,base,more,hard

%O 1,2

%A _Paolo P. Lava_, Nov 17 2017

%E a(4)-a(5) from _Giovanni Resta_, Nov 17 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 17:42 EDT 2024. Contains 371254 sequences. (Running on oeis4.)