login
A256964
Solution to Popular Computing Problem 196.
1
6, 8, 10, 9, 14, 12, 4, 15, 22, 5, 26, 21, 18, 32, 34, 7, 38, 40, 24, 33, 46, 27, 50, 39, 30, 56, 58, 11, 62, 48, 36, 51, 70, 13, 74, 57, 42, 60, 82, 45, 86, 88, 16, 69, 94, 17, 98, 75, 54, 104, 106, 19, 110, 84, 20, 87, 118, 63, 122, 93, 66, 128, 130, 23, 134
OFFSET
1,1
COMMENTS
See link for statement of the problem.
LINKS
Popular Computing (Calabasas, CA), Problems 195 and 196, Vol. 5 (No. 55, 1977), annotated and scanned copy of page PC55-4. See Problem 196.
MATHEMATICA
A256964 = {}; nlist = Range[3, 2 10^4 + 10]; Do[x = nlist[[i]]; AppendTo[ A256964, nlist[[x+i]]]; nlist[[x+i]] = x, {i, 10^4}]; A256964 (* Jean-François Alcover, May 31 2019, after Chai Wah Wu *)
PROG
(Python)
A256964_list, nlist = [], list(range(3, 2*10**4+10))
for i in range(10**4):
x = nlist[i]
A256964_list.append(nlist[x+i])
nlist[x+i] = x # Chai Wah Wu, Apr 16 2015
CROSSREFS
Cf. A249990.
Sequence in context: A099102 A001743 A366728 * A046344 A116366 A315849
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 16 2015
STATUS
approved