Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A116381
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 13 20:18 EDT 2008. Contains 145016 sequences.


AT&T Labs Research