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.

A258240 Number of steps from n to 0, where allowable steps are x -> [x/r] if x = is in A001952 (the Beatty sequence for 2 + sqrt(2)) and x -> [r*x] otherwise, where [ ] = floor and r = 2 + sqrt(2).

This page as a plain text file.
%I A258240 #4 Jun 07 2015 18:03:36
%S A258240 0,2,4,1,3,5,3,5,7,9,5,7,9,2,4,6,8,4,6,8,6,8,10,4,6,8,10,6,8,10,8,10,
%T A258240 12,14,10,12,14,6,8,10,8,10,12,14,10,12,14,3,5,7,9,5,7,9,7,9,11,13,9,
%U A258240 11,13,5,7,9,7,9,11,13,9,11,13,7,9,11,13,9,11
%N A258240 Number of steps from n to 0, where allowable steps are x -> [x/r] if x = is in A001952 (the Beatty sequence for 2 + sqrt(2)) and x -> [r*x] otherwise, where [ ] = floor and r = 2 + sqrt(2).
%C A258240 a(n) = number of edges from 0 to n in the tree at A258239.
%H A258240 Clark Kimberling, <a href="/A258240/b258240.txt">Table of n, a(n) for n = 0..10000</a>
%e A258240 8->27->7->23->6->1->3->0, so that a(8) = 7.
%t A258240 r = 2+Sqrt[2]; w = Table[Floor[r*n], {n, 1, 1000}];
%t A258240 f[x_] := If[MemberQ[w, x], Floor[x/r], Floor[r*x]];
%t A258240 g[x_] := Drop[FixedPointList[f, x], -1];
%t A258240 Table[-1+ Length[g[n]], {n, 0, 100}]
%Y A258240 Cf. A258239, A258212, A001952.
%K A258240 nonn,easy
%O A258240 0,2
%A A258240 _Clark Kimberling_, Jun 05 2015