login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224716 Number of primes contained in the concatenations of the length-1 to length-n partial permutations of {1,..., n}. 0
0, 1, 5, 14, 36, 119, 1336, 5056, 43089, 519812 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..10.

EXAMPLE

For n=3:  The permutations of {1, 2, 3} are {{1}, {2}, {3}, {1, 2}, {1, 3}, {2, 1}, {2, 3}, {3, 1}, {3, 2}, {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}}, the concatenations are {1, 2, 3, 12, 13, 21, 23, 31, 32, 123, 132, 213, 231, 312, 321}, and the primes are {2, 3, 13, 23, 31}, so a(3) = 5.

MATHEMATICA

pp[n_] := Module[{m, lst = {}}, For[m = 1, m <= n, m++, AppendTo[lst, Length[Select[ToExpression@StringJoin@IntegerString@# & /@ Permutations[Range[m], All], PrimeQ[#] &]]]; ]; lst ]; pp[10] (* J. Stauduhar, Apr 28 2013*)

CROSSREFS

Sequence in context: A048745 A307462 A292170 * A127980 A054486 A072130

Adjacent sequences:  A224713 A224714 A224715 * A224717 A224718 A224719

KEYWORD

nonn,base,more,hard

AUTHOR

J. Stauduhar, Apr 27 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 15 07:56 EDT 2019. Contains 328026 sequences. (Running on oeis4.)