

A116381


Number of compositions of n which are prime when concatenated and read as a decimal string.


1



0, 2, 1, 3, 7, 0, 29, 27, 0, 90, 236, 0, 758, 1039, 0, 3949, 9325, 0, 32907, 51243, 0, 184458, 426372, 0, 1552101, 2537233, 0, 9526385
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

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


EXAMPLE

The eight compositions of 4 are 4,13,31,22,112,121,211,1111 of which 3 {13,31,211} are primes.


MATHEMATICA

f[n_] := If[n > 5 && Mod[n, 3] == 0, 0, Block[{len = PartitionsP@ n, p = IntegerPartitions[n], c = 0}, Do[c = c + Length@ Select[ FromDigits /@ Join @@@ IntegerDigits /@ Permutations@ p[[i]], PrimeQ@# &], {i, len}]; c]]; Array[f, 28] (* Robert G. Wilson v, Aug 03 2012 *)


CROSSREFS

Cf. A069869, A069870; not the same as A073901.
Sequence in context: A321651 A326308 A073901 * A176120 A220621 A058170
Adjacent sequences: A116378 A116379 A116380 * A116382 A116383 A116384


KEYWORD

base,nonn


AUTHOR

Robert G. Wilson v, Feb 06 2006


STATUS

approved



