

A256961


Generated by a rearranging problem (see links for precise definition).


1



6, 5, 26, 14, 16, 9, 11, 30, 4, 92, 31, 64, 28, 44, 46, 22, 52, 126, 256, 197, 230, 110, 125, 13, 21, 196, 336, 684, 462, 632, 852, 1208, 780, 1278, 544, 796, 520, 8, 3864, 98, 1782, 5316, 6372, 7714, 7274, 3818, 4254, 9046, 6412, 2168, 2856, 2148, 1206, 3246
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

Alois P. Heinz, Chai Wah Wu and Christian Perfect Table of n, a(n) for n = 1..5000 (Terms 1..100 by Alois P. Heinz; terms 101..137 by Chai Wah Wu; terms 138..5000 by Christian Perfect)
Popular Computing (Calabasas, CA), Contest 15: Coding Fun and Profit: Rearranging All The Numbers, Vol. 5 (#57, Dec 1977), page PC572.
Popular Computing (Calabasas, CA), Contest 15: Coding Fun and Profit: Rearranging All The Numbers, Vol. 5 (#57, Dec 1977), page PC571 (front cover).


PROG

(Python)
def flip(i, n):
..m = i%n
..m2 = nm1
..return im+m2
.
def revert(i, moves):
..for move, leader in reversed(moves):
....if i==leader1:
......i=0
....else:
......i+=1
....
....i = flip(i, move)
..return i+3
.
def a256961():
..moves = []
..while True:
....move = revert(0, moves)
....leader = revert(move1, moves)
....out = revert(flip(leader, move), moves)
....yield out
....moves.append((move, leader))
# Christian Perfect, Apr 20 2015


CROSSREFS

Sequence in context: A248265 A267284 A228969 * A267743 A298155 A219931
Adjacent sequences: A256958 A256959 A256960 * A256962 A256963 A256964


KEYWORD

nonn


AUTHOR

N. J. A. Sloane, Apr 15 2015


EXTENSIONS

More terms from Alois P. Heinz, Apr 16 2015
More terms from Christian Perfect, Apr 20 2015


STATUS

approved



