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.

A105025 Write numbers in binary under each other; to get the next block of 2^k (k >= 0) terms of the sequence, start at 2^k, read diagonals in downward direction and convert to decimal.

This page as a plain text file.
%I A105025 #21 Aug 20 2019 07:48:29
%S A105025 0,1,3,2,4,7,6,5,11,10,9,12,15,14,13,8,18,17,20,23,22,21,16,27,26,25,
%T A105025 28,31,30,29,24,19,33,36,39,38,37,32,43,42,41,44,47,46,45,40,35,50,49,
%U A105025 52,55,54,53,48,59,58,57,60,63,62,61,56,51,34,68,71,70,69,64,75,74,73,76
%N A105025 Write numbers in binary under each other; to get the next block of 2^k (k >= 0) terms of the sequence, start at 2^k, read diagonals in downward direction and convert to decimal.
%C A105025 This is a permutation of the nonnegative integers.
%C A105025 a(A214433(n)) = A105027(A214433(n)); a(A214489(n)) = A105029(A214489(n)). - _Reinhard Zumkeller_, Jul 21 2012
%H A105025 Reinhard Zumkeller, <a href="/A105025/b105025.txt">Table of n, a(n) for n = 0..10000</a>
%H A105025 David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>].
%H A105025 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%H A105025 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%e A105025 ........0
%e A105025 ........1
%e A105025 .......10
%e A105025 .......11
%e A105025 ......100 <- Starting here, the downward diagonals
%e A105025 ......101 read 100, 111, 110, 101, giving the block 4, 7, 6, 5.
%e A105025 ......110
%e A105025 ......111
%e A105025 .....1000
%e A105025 .....1001
%e A105025 .....1010
%e A105025 .....1011
%e A105025 .........
%p A105025 a:=proc(i,j) if j=1 and i<=16 then 0 else convert(i+15,base,2)[7-j] fi end: seq(a(i,2)*2^4+a(i+1,3)*2^3+a(i+2,4)*2^2+a(i+3,5)*2+a(i+4,6),i=1..16); # this is a Maple program (not necessarily the simplest) only for one block of (2^4) numbers # _Emeric Deutsch_, Apr 16 2005
%t A105025 numberOfBlocks = 7; bloc[n_] := Join[ Table[ IntegerDigits[k, 2], {k, 2^(n-1), 2^n-1}], Table[ Rest @ IntegerDigits[k, 2], {k, 2^n, 2^n+n}]]; Join[{0, 1}, Flatten[ Table[ Table[ Diagonal[bloc[n], k] // FromDigits[#, 2]&, {k, 0, -2^(n-1)+1, -1}], {n, 2, numberOfBlocks}]]] (* _Jean-François Alcover_, Nov 03 2016 *)
%o A105025 (Haskell)
%o A105025 import Data.Bits ((.|.), (.&.))
%o A105025 a105025 n = foldl (.|.) 0 $ zipWith (.&.)
%o A105025                   a000079_list $ reverse $ enumFromTo n (n - 1 + a070939 n)
%o A105025 -- _Reinhard Zumkeller_, Jul 21 2012
%Y A105025 Cf. A102370, A105026.
%Y A105025 Cf. A070939, A000079.
%Y A105025 Cf. A105271 (fixed points), A214416 (inverse).
%K A105025 nonn,nice,base
%O A105025 0,3
%A A105025 _N. J. A. Sloane_, Apr 03 2005
%E A105025 More terms from _Emeric Deutsch_, Apr 16 2005