login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105027 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 upward direction and convert to decimal. 13

%I #32 Apr 18 2022 22:33:10

%S 0,1,3,2,6,5,4,7,15,10,9,8,11,14,13,12,28,23,18,17,16,19,22,21,20,31,

%T 26,25,24,27,30,29,61,44,39,34,33,32,35,38,37,36,47,42,41,40,43,46,45,

%U 60,55,50,49,48,51,54,53,52,63,58,57,56,59,62,126,93,76,71,66,65,64,67,70

%N 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 upward direction and convert to decimal.

%C This is a permutation of the nonnegative integers.

%C Structure: blocks of size 2^k - 1 taken from A102370, interspersed with terms of A102371. - _Philippe Deléham_, Nov 17 2007

%C a(A062289(n)) = A102370(n) for n > 0; a(A000225(n)) = A102371(n); a(A214433(n)) = A105025(a(n)). - _Reinhard Zumkeller_, Jul 21 2012

%H Reinhard Zumkeller, <a href="/A105027/b105027.txt">Table of n, a(n) for n = 0..10000</a>

%H 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 David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL8/Sloane/sloane300.html">Sloping binary numbers: a new sequence related to the binary numbers</a>, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(2^n - 1) = A102371(n) for n > 0. - _Philippe Deléham_, May 10 2005

%e 0

%e 1

%e 10

%e 11

%e -> 100 Starting here, the upward diagonals

%e 101 read 110, 101, 100, 111, giving the block 6, 5, 4, 7.

%e 110

%e 111

%e 1000

%e 1001

%e 1010

%e 1011

%e ...

%t block[k_] := Module[{t}, t = Table[PadLeft[IntegerDigits[n, 2], k+1], {n, 2^(k-1), 2^(k+1)-1}]; Table[FromDigits[Table[t[[n-m+1, m]], {m, 1, k+1}], 2], {n,2^(k-1)+1, 2^(k-1)+2^k}]]; block[0] = {0, 1}; Table[block[k], {k, 0, 6}] // Flatten (* _Jean-François Alcover_, Jun 30 2015 *)

%o (Haskell)

%o import Data.Bits ((.|.), (.&.))

%o a105027 n = foldl (.|.) 0 $ zipWith (.&.)

%o a000079_list $ enumFromTo (n + 1 - a070939 n) n

%o -- _Reinhard Zumkeller_, Jul 21 2012

%o (PARI) apply( {A105027(n,L=exponent(n+!n))=sum(k=0,L,bitand(n+k-L,2^k))}, [0..55]) \\ _M. F. Hasler_, Apr 18 2022

%Y Cf. A102370, A105025, A105026, A105028.

%Y Cf. A070939, A000079.

%Y Cf. A214414 (fixed points), A214417 (inverse).

%K nonn,nice,base

%O 0,3

%A _N. J. A. Sloane_, Apr 03 2005

%E More terms from _John W. Layman_, Apr 07 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 11 17:18 EDT 2024. Contains 375073 sequences. (Running on oeis4.)