A256964 Solution to Popular Computing Problem 196.
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
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- Popular Computing (Calabasas, CA), Problems 195 and 196, Vol. 5 (No. 55, 1977), annotated and scanned copy of page PC55-4. See Problem 196.
Crossrefs
Cf. A249990.
Programs
-
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 *)
-
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
Comments