|
Search: id:A116381
|
|
|
| A116381 |
|
Number of compositions of n which are prime when concatenated and read as a decimal string. |
|
+0 2
|
|
| 0, 2, 1, 3, 7, 0, 29, 27, 0, 90, 236, 0, 758, 1037, 0, 3925, 9299, 0, 32799, 50858, 0, 182853, 424186, 0, 1541655
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
EXAMPLE
|
The eight compositions of 4 are 4,13,31,22,112,121,211,1111 of which 3 {13,31,211} are primes.
|
|
MATHEMATICA
|
(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := If[ n > 5 && Mod[n, 3] == 0, 0, Block[{len = PartitionsP[n], p = Partitions[n], s = 0}, Do[ s = s + Length@ Select[FromDigits /@ Join @@@ IntegerDigits /@ Permutations@p[[i]], PrimeQ@# &], {i, len}]; s]]; Array[f, 25]
|
|
CROSSREFS
|
Cf. A069869, A069870; not the same as A073901.
Adjacent sequences: A116378 A116379 A116380 this_sequence A116382 A116383 A116384
Sequence in context: A024961 A140644 A125889 this_sequence A073901 A058170 A127896
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
Robert G. Wilson v (rgwv(AT)rgwv.com), Feb 06 2006
|
|
|
Search completed in 0.002 seconds
|