login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

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 August 3 05:55 EDT 2020. Contains 336197 sequences. (Running on oeis4.)