Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A121862
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A121862 Least previously nonoccurring positive integer such that partial sum + 2 is prime. +0
4
1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, 36, 38, 22, 30, 48, 56, 54, 46, 44, 42, 60, 40, 50, 58, 66, 62, 52, 68, 64, 84, 90, 72, 92, 70, 96, 80, 94, 78, 104, 76, 74, 106, 102, 110, 88, 98, 82, 108, 114, 126, 116, 118, 86, 100, 120, 144, 122, 130, 128, 136 (list; graph; listen)
OFFSET

1,2

COMMENT

a(n) = {1} UNION {permutation of even positive numbers}. The corresponding partial sums + 1 are 3, 5, 11, 19, 23, 37, 47, 59, 79, 97, 113, 137, 163, 191, 223.

FORMULA

a(n) = MIN{k>0 such that 2 + k + SUM[i=1..n-1]a(i) is prime and k <> a(i)}.

EXAMPLE

a(1) = 1 because 1+2 = 3 is prime.

a(2) = 2 because 1+2+2 = 5 is prime.

a(3) = 6 because 1+2+6+2 = 11 is prime.

a(4) = 8 because 1+2+6+8+2 = 19 is prime.

a(5) = 4 because 1+2+6+8+4+2 = 23 is prime.

MATHEMATICA

f[s_] := Append[s, k = 1; p = 2 + Plus @@ s; While[MemberQ[s, k] || ! PrimeQ[p + k], k++ ]; k]; Nest[f, {}, 67] - Robert G. Wilson v, Aug 31 2006

CROSSREFS

Cf. A000040, A121861.

Sequence in context: A115317 A117932 A073411 this_sequence A095677 A011045 A002210

Adjacent sequences: A121859 A121860 A121861 this_sequence A121863 A121864 A121865

KEYWORD

easy,nonn

AUTHOR

Jonathan Vos Post (jvospost2(AT)yahoo.com), Aug 30 2006

EXTENSIONS

More terms from Robert G. Wilson v, Aug 31 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