cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A246964 Limiting sequence of transformations when we start with the all 1's sequence a=A000012 and at step n>=0 replace a(n+a(n)) with Sum_{k=n..n+a(n)} a(k).

This page as a plain text file.
%I A246964 #58 Nov 13 2020 02:41:39
%S A246964 1,2,1,5,1,2,1,5,10,1,2,1,23,1,2,1,5,1,39,1,2,47,50,1,2,1,5,1,2,1,5,
%T A246964 10,1,2,1,105,1,2,1,5,1,121,1,2,129,132,1,2,1,5,1,2,1,5,10,1,2,206,
%U A246964 432,1,2,1,5,1,449,1,2,457,889,1,2,1,820,1,2,1,5,1
%N A246964 Limiting sequence of transformations when we start with the all 1's sequence a=A000012 and at step n>=0 replace a(n+a(n)) with Sum_{k=n..n+a(n)} a(k).
%H A246964 Alois P. Heinz, <a href="/A246964/b246964.txt">Table of n, a(n) for n = 0..20000</a>
%e A246964 Start . . . . . . . . . . . . . . . . .       : 1,1,1,1,1,...
%e A246964 Step 0: a(0+a(0)) = a(1)<- a(0)+a(1) = 2      : 1,2,1,1,1,...
%e A246964 Step 1: a(1+a(1)) = a(3)<- a(1)+a(2)+a(3) = 4 : 1,2,1,4,1,...
%e A246964 Step 2: a(2+a(2)) = a(3)<- a(2)+a(3) = 5      : 1,2,1,5,1,...
%p A246964 mx:= 20000:  # maximal index needed
%p A246964 b:= proc() 1 end:
%p A246964 a:= proc(n) option remember; global mx; local t;
%p A246964       if n<0 then 0 else a(n-1); t:= b(n);
%p A246964         if n+t<= mx then b(n+t):= add(b(k), k=n..n+t) fi; t
%p A246964       fi
%p A246964     end:
%p A246964 seq(a(n), n=0..100);  # _Alois P. Heinz_, Mar 04 2015
%t A246964 mx = 20000; (* Maximal index needed *)
%t A246964 b[_] = 1;
%t A246964 a[n_] := a[n] = Module[{t}, If[n<0, 0, t = b[n]; If[n+t <= mx, b[n+t] = Sum[b[k], {k, n, n+t}]]; t]];
%t A246964 a /@ Range[0, 100] (* _Jean-François Alcover_, Nov 13 2020, after _Alois P. Heinz_ *)
%K A246964 nonn,look
%O A246964 0,2
%A A246964 _Floor van Lamoen_, Mar 02 2015