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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A219360 Starting from a(1)=1, for any n the sum of the next a(n) numbers is a prime. No repetition of numbers is allowed. At any step the minimum integer not yet used and not leading to a contradiction is chosen. 1
 1, 2, 3, 4, 5, 8, 6, 10, 7, 12, 9, 11, 18, 16, 13, 22, 15, 14, 17, 23, 19, 20, 34, 21, 24, 25, 26, 33, 27, 40, 32, 42, 29, 28, 30, 46, 31, 37, 35, 39, 36, 38, 41, 43, 45, 44, 47, 48, 65, 49, 52, 50, 54, 51, 53, 66, 72, 55, 56, 57, 73, 68, 63, 58, 59, 61, 60, 82 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Permutation of natural numbers. LINKS Paolo P. Lava, Table of n, a(n) for n = 1..150 EXAMPLE a(1)=1 -> next term is 2, prime. a(2)=2 -> the sum of the next two terms 3 + 4 = 7, prime. a(3)=3 -> 4 + 5 + 8 = 17, prime. a(4)=4 -> 5 + 8 + 6 + 10 = 29, prime. a(5)=5 -> 8 + 6 + 10 + 7 + 12 = 43, prime. a(6)=8 but we also have a(7)=6 that must be covered before a(6). Therefore the sequence became: 1, 2, 3, 4, 5, 8, 6, 10, 7, 12, 9, 11, 18, ... with 10 + 7 + 12 + 9 + 11 + 18 = 67, prime. Then coming back to a(6)=8:  1, 2, 3, 4, 5, 8, 6, 10, 7, 12, 9, 11, 18, 16, ... with 6 + 10 + 7 + 12 + 9 + 11 + 18 + 16 = 89. It could happen that two or more sums must be satisfied at the same step. If it is not possible we must change the most recent entries. For example, the sequence up to a(30) is: 1, 2, 3, 4, 5, 8, 6, 10, 7, 12, 9, 11, 18, 16, 13, 22, 14, 15, 17, 23, 19, 20, 34, 21, 24, 25, 26, 33, 27, 40. Now a(13)=18 and a(17)=14 must be satisfied in a(31) but 16 + 13 + 22 + 14 + 15 + 17 + 23 + 19 + 20 + 34 + 21 + 24 + 25 + 26 + 33 + 27 + 40 = 389 (odd) and 15 + 17 + 23 + 19 + 20 + 34 + 21 + 24 + 25 + 26 + 33 + 27 + 40 = 324 (even) and no integer a(31) can satisfy the system 389 + a(31) = p1 and 324 + a(31) = p2, with p1 and p2 both prime. Therefore we must change a(17)=14 into a new minimum value, in this case a(17)=15, and restart the sequence from that point. CROSSREFS Cf. A000040, A171007. Sequence in context: A085176 A192179 A118462 * A275877 A245819 A207802 Adjacent sequences:  A219357 A219358 A219359 * A219361 A219362 A219363 KEYWORD nonn,hard AUTHOR Paolo P. Lava, Nov 19 2012 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.

Last modified August 8 23:02 EDT 2020. Contains 336300 sequences. (Running on oeis4.)