login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122866 Consider the array of sequences defined to be "the least previously nonoccurring positive integer such that partial sum + k is prime" beginning with k=0. This sequence is the main diagonal of that array. 2
2, 3, 6, 4, 12, 10, 16, 12, 16, 24, 26, 24, 30, 28, 28, 44, 36, 42, 20, 38, 34, 54, 54, 56, 48, 44, 50, 52, 68, 56, 56, 60, 62, 66, 66, 70, 76, 84, 76, 58, 92, 90, 88, 90, 80, 88, 92, 102, 104, 102, 114, 104, 108, 98, 114, 108, 92, 100, 120, 126, 124, 130, 126, 142, 116, 126 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
EXAMPLE
The array of sequences begins
k= 0: 2, 1, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, ...,.
k= 1: 1, 3, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, ...,.
k= 2: 1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, ...,.
k= 3: 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, ...,.
k= 4: 1, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, ...,.
k= 5: 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, 28, ...,.
MATHEMATICA
f[s_] := Append[s, k = 1; p = q + Plus @@ s; While[MemberQ[s, k] || !PrimeQ[p + k], k++ ]; k]; T[n_, k_] := Nest[q = k; f, {}, n][[ -1]]; Table[T[n, n - 1], {n, 66}]
CROSSREFS
Sequence in context: A225642 A273317 A328443 * A097275 A130879 A119741
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset changed to 0 by Chai Wah Wu, Aug 27 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)