login
A193508
a(n) = n if n is not a power of 2 and a(2^n) = a(n).
0
0, 0, 0, 3, 0, 5, 6, 7, 3, 9, 10, 11, 12, 13, 14, 15, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 5, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 65, 66, 67, 68
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
Sequence in context: A102391 A038556 A342303 * A307728 A263199 A052483
KEYWORD
nonn,easy
AUTHOR
STATUS
approved