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.

A261644 Distance of A260273(n) to next power of 2.

This page as a plain text file.
%I A261644 #8 Sep 18 2015 20:06:26
%S A261644 1,1,3,8,5,1,15,12,9,5,1,31,28,25,20,13,8,3,63,60,57,52,47,44,41,37,
%T A261644 33,29,24,17,13,8,3,127,124,121,116,111,108,105,99,91,88,85,81,77,70,
%U A261644 66,62,57,52,47,40,33,29,24,15,10,6,2,254,251,248,245,239
%N A261644 Distance of A260273(n) to next power of 2.
%C A261644 This sequence, as well as A261712, is suggested by A261396 and A261416.
%H A261644 Reinhard Zumkeller, <a href="/A261644/b261644.txt">Rows n = 1..20 of triangle, flattened</a>
%F A261644 a(n) = A062383(A260273(n)) - A260273(n).
%e A261644 .  1: 1
%e A261644 .  2: 1
%e A261644 .  3: 3
%e A261644 .  4: 8,5,1
%e A261644 .  5: 15,12,9,5,1
%e A261644 .  6: 31,28,25,20,13,8,3
%e A261644 .  7: 63,60,57,52,47,44,41,37,33,29,24,17,13,8,3
%e A261644 .  8: 127,124,121,116,111,108,105,99,91,88,85,81,77,70,... (27 terms)
%e A261644 .  9: 254,251,248,245,239,236,233,227,218,213,207,202,195,,... (49 terms)
%o A261644 (Haskell)
%o A261644 a261644 n = a261644_list !! (n-1)
%o A261644 a261644_list = zipWith (-)
%o A261644                (map a062383 a260273_list) $ map fromIntegral a260273_list
%o A261644 a261644_tabf = [1] : f (tail $ zip a261645_list a261644_list) where
%o A261644    f dxs = (map snd (dxs'' ++ [dx])) : f dxs' where
%o A261644      (dxs'', dx:dxs') = span ((<= 0) . fst) dxs
%o A261644 a261644_row n = a261644_tabf !! (n-1)
%Y A261644 Cf. A260273, A062383, A261645 (first differences), A261712 (reversed), A261646 (row lengths).
%K A261644 nonn,tabf
%O A261644 1,3
%A A261644 _Reinhard Zumkeller_, Aug 30 2015