login
A331306
Lexicographically earliest infinite sequence such that a(i) = a(j) => A285732(i) = A285732(j) for all i, j.
3
1, 2, 2, 3, 4, 5, 6, 5, 3, 7, 8, 9, 10, 9, 11, 12, 13, 7, 6, 14, 15, 16, 17, 14, 18, 13, 19, 20, 21, 22, 23, 11, 8, 23, 24, 25, 26, 27, 28, 19, 29, 17, 30, 31, 32, 33, 34, 35, 30, 15, 12, 28, 36, 37, 38, 39, 40, 41, 42, 24, 43, 22, 42, 44, 45, 46, 47, 48, 49, 50, 36, 20, 16, 35, 51, 52, 53, 54, 55, 56, 57, 58, 51, 31, 59, 27, 50, 60, 61, 62, 63, 64, 65, 66, 67, 68, 44, 25, 21, 41
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A285732 (when considered as an one-dimensional sequence).
For all i, j:
a(i) = a(j) => A003989(i) = A003989(j),
a(i) = a(j) => A331307(i) = A331307(j) => A072030(i) = A072030(j).
LINKS
PROG
(PARI)
up_to = 25425; \\ = binomial(225+1, 2)
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A000027pairton(a, b) = ((2+((a+b)^2 - a) - (3*b))/2);
A285732sq(n, k) = if(n==k, -n, if(n>k, A000027pairton(n-k, k), A000027pairton(n, k-n)));
A285732list(up_to) = { my(v = vector(up_to), i=0); for(a=1, oo, for(col=1, a, i++; if(i > up_to, return(v)); v[i] = A285732sq(col, (a-(col-1))))); (v); };
v331306 = rgs_transform(A285732list(up_to));
A331306(n) = v331306[n];
CROSSREFS
Cf. also A331305, A331307.
Sequence in context: A093936 A329904 A331307 * A119353 A140859 A072586
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jan 19 2020
STATUS
approved