OFFSET
0,4
MATHEMATICA
fra[n_] := fra[n]= If[IntegerQ[Log[2, n]] == False, n, fra[Log[2, n]]]; Table[fra[n], {n, 0, 211}]
PROG
(PARI) a(n)=if(n<3, 0, if(#binary(n)!=#binary(n-1), a(#binary(n-1)), n)) \\ Charles R Greathouse IV, Jul 29 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jul 29 2011
STATUS
approved