Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A069870
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A069870 Smallest prime that can be formed using a partition of n, or 0 if no such prime exists. +0
3
0, 2, 3, 13, 5, 0, 7, 17, 0, 19, 11, 0, 13, 59, 0, 79, 17, 0, 19, 137, 0, 139, 23, 0, 223, 179, 0, 127, 29, 0, 31, 131, 0, 277, 233, 0, 37, 137, 0, 139, 41, 0, 43, 359, 0, 379, 47, 0, 409, 149, 0, 151, 53, 0, 487, 353, 0, 157, 59, 0, 61, 359, 0, 163, 263, 0, 67, 167, 0, 367, 71, 0 (list; graph; listen)
OFFSET

1,2

EXAMPLE

a(4) = 13 as the partitions of 4 are (4), (3, 1), ( 2, 2), (2, 1, 1) (1, 1, 1, 1). The primes that can be formed are 13, 31, 211 and 13 is the smallest prime using a partition.

MATHEMATICA

(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := If[ PrimeQ@n, n, If[n > 5 && Mod[n, 3] == 0, 0, Block[{len = PartitionsP[n], p = Partitions[n], t = {}}, Do[ AppendTo[t, Select[FromDigits /@ Join @@@ IntegerDigits /@ Permutations@p[[i]], PrimeQ@# &]], {i, len}]; t = Union@Flatten@t; If[Length@t > 0, Min@t, 0]] ]]; Array[f, 72] (* Robert G. Wilson v *)

CROSSREFS

Cf. A069869.

Sequence in context: A012713 A009814 A051298 this_sequence A067180 A067182 A085402

Adjacent sequences: A069867 A069868 A069869 this_sequence A069871 A069872 A069873

KEYWORD

nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Apr 21 2002

EXTENSIONS

Edited by David Wasserman (wasserma(AT)spawar.navy.mil), May 01 2003

Corrected by T. D. Noe (noe(AT)sspectra.com), Nov 15 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 August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research