login
Charlie Chaplin numbers: Stage 1: the input is the sequence F(n) = 1,2,1,2,1,2,1,2,... of alternating 1's and 2s, starting with F(1)=1. Let m = 1. At each iteration take F(m) and add it to F(m+F(m)) then increment m by 1 and repeat. The numbers are the values of F(m) which are larger than all previous values.
2

%I #26 Aug 08 2015 21:19:12

%S 1,3,4,5,8,11,12,13,14,15,16,17,23,33,37,39,68,73,76,79,85,90,97,117,

%T 157,160,180,252,253,368,376,378,381,421,429,534,644,652,657,742,743,

%U 746,839,890,1026,1329,1344,1345,1523,1526,1545,1546,1547,1550,1562

%N Charlie Chaplin numbers: Stage 1: the input is the sequence F(n) = 1,2,1,2,1,2,1,2,... of alternating 1's and 2s, starting with F(1)=1. Let m = 1. At each iteration take F(m) and add it to F(m+F(m)) then increment m by 1 and repeat. The numbers are the values of F(m) which are larger than all previous values.

%C Charlie Chaplin numbers are inspired by his comedy routine working on a conveyor belt. Which input functions give chaotic outputs? How does the output sequence grow?

%C Comment from _David Wasserman_, Mar 11 2008: The sequence gives the record values of the system output. The record values that occur while computing the system output are given in A116587.

%H David Wasserman and Paul Tek, <a href="/A101210/b101210.txt">Table of n, a(n) for n = 1..1000</a> (first 79 terms from David Wasserman)

%p A101210 := proc(nmax) local F, m,Fnew,Fnewidx,a ; F := [seq(2- (i mod 2),i=1..nmax)] ; m := 1: while m <= nops(F) do if m+op(m,F) <= nops(F) then Fnew := op(m,F)+op(m+op(m,F),F) ; Fnewidx := m+op(m,F) ; F := subsop(Fnewidx=Fnew,F) ; fi ; m := m+1 ; od: a := [1] ; for m from 2 to nops(F) do if op(m,F) > op(-1,a) then a := [op(a),op(m,F)] ; fi ; od: a ; end: A101210(40000) ; # _R. J. Mathar_, Mar 12 2008

%t max = 50000; chCh = Flatten[Table[{1, 2}, {max}]]; iter = 1; While[iter < max/2, chCh[[iter + chCh[[iter]]]] += chCh[[iter]]; iter++]; currHigh=1; jter=2; While[jter <= Length[chCh], If[chCh[[jter]] > currHigh, currHigh = chCh[[jter]]; jter++, chCh = Drop[chCh, {jter}]]]; chCh = Drop[chCh, -1] (* _Alonso del Arte_, Dec 03 2011 *)

%Y Cf. A116587.

%K easy,nonn,obsc

%O 1,2

%A _Gordon Hamilton_, Dec 14 2004

%E More terms from _David Wasserman_, Mar 11 2008

%E More terms from _R. J. Mathar_, Mar 12 2008