A302717 Start with a(0) = 0, then append the terms in [x, 2*x+1, x*(x+1)] which do not occur earlier, for x = 1, 2, ...
0, 1, 3, 2, 5, 6, 7, 12, 4, 9, 20, 11, 30, 13, 42, 15, 56, 8, 17, 72, 19, 90, 10, 21, 110, 23, 132, 25, 156, 27, 182, 14, 29, 210, 31, 240, 16, 33, 272, 35, 306, 18, 37, 342, 39, 380, 41, 420, 43, 462, 22, 45, 506, 47, 552, 24, 49, 600, 51, 650, 26, 53, 702, 55, 756, 28, 57, 812, 59, 870, 61, 930, 63, 992, 32, 65, 1056, 67, 1122, 34, 69, 1190
Offset: 0
Keywords
Examples
Repeatedly take consecutive numbers a and b and append to the sequence any of {a, a+b, a*b, b} not already in the sequence. Beginning with a=0 and b=1: (0,1) -> {0, 0+1, 0*1, 1} -> [0,1] (1,2) -> {1, 1+2, 1*2, 2} -> [0,1,3,2] (2,3) -> {2, 2+3, 2*3, 3} -> [0,1,3,2,5,6] (3,4) -> {3, 3+4, 3*4, 4} -> [0,1,3,2,5,6,7,12,4] etc. In the above construction, we always have b = a+1. Thus [a, a+b, a*b, b] = [a, 2*a+1, a*(a+1), a+1], and a simpler description is to consider only { a, 2*a+1, a*(a+1) }, the 4th term being equal to the 1st term of the next 4-tuple. To ensure we have a permutation of the integers >= 0 starting at index 0 and not a list stating at index 1, we can fix a(0) = 0 explicitly and then go on with a = x = 1, 2, 3, ... to get the same sequence.
Links
- J. Stauduhar, permutation of nonnegative integers, SeqFan list, Apr 11 2018
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
u=[];(do(x)=setsearch(u,x)||print1(x",")||u=setunion(u,[x]));for(a=0,199,do(a);do(2*a+1);do(a^2+a)) \\ M. F. Hasler, Apr 12 2018
Comments