Original entry on oeis.org
2, 1, 2, 1, 4, 3, 2, 5, 8, 7, 6, 1, 12, 11, 10, 13, 16, 15, 14, 9, 4, 19, 18, 21, 24, 23, 22, 17, 28, 27, 26, 29, 32, 31, 30, 25, 20, 3, 34, 37, 40, 39, 38, 33, 44, 43, 42, 45, 48, 47, 46, 41, 36, 51, 50, 53, 56, 55, 54, 49, 60, 59, 58, 61, 64, 63, 62, 57
Offset: 1
a(7) = 2^7 - A103529(7) = 128 - 126 = 2.
- Nathaniel Johnston, Table of n, a(n) for n = 1..1000
- David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [pdf, ps].
- David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp.
-
a:=proc(n)local k,t: if(n=1)then return 2:fi: t:= 2^(n-1) + (n-1): for k from 1 to n-1 do if(k = (n-1) mod 2^k)then t:=t-2^k: fi: od: return t: end: seq(a(n),n=1..80); # Nathaniel Johnston, Apr 30 2011
A102370
"Sloping binary numbers": write numbers in binary under each other (right-justified), read diagonals in upward direction, convert to decimal.
Original entry on oeis.org
0, 3, 6, 5, 4, 15, 10, 9, 8, 11, 14, 13, 28, 23, 18, 17, 16, 19, 22, 21, 20, 31, 26, 25, 24, 27, 30, 61, 44, 39, 34, 33, 32, 35, 38, 37, 36, 47, 42, 41, 40, 43, 46, 45, 60, 55, 50, 49, 48, 51, 54, 53, 52, 63, 58, 57, 56, 59, 126, 93, 76, 71, 66, 65, 64, 67, 70, 69
Offset: 0
........0
........1
.......10
.......11
......100
......101
......110
......111
.....1000
.........
The upward-sloping diagonals are:
0
11
110
101
100
1111
1010
.......
giving 0, 3, 6, 5, 4, 15, 10, ...
The sequence has a natural decomposition into blocks (see the paper): 0; 3; 6, 5, 4; 15, 10, 9, 8, 11, 14, 13; 28, 23, 18, 17, 16, 19, 22, 21, 20, 31, 26, 25, 24, 27, 30; 61, ...
Reading the array of binary numbers along diagonals with slope 1 gives this sequence, slope 2 gives A105085, slope 0 gives A001477 and slope -1 gives A105033.
- Seiichi Manyama, Table of n, a(n) for n = 0..10000 (first 1001 terms from T. D. Noe)
- David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers, J. Integer Seq. 8 (2005), no. 3, Article 05.3.6, 15 pp. Preprint versions: [pdf, ps].
- Index entries for sequences related to binary expansion of n
Related sequences (1):
A103542 (binary version),
A102371 (complement),
A103185,
A103528,
A103529,
A103530,
A103318,
A034797,
A103543,
A103581,
A103582,
A103583.
Related sequences (2):
A103584,
A103585,
A103586,
A103587,
A103127,
A103192 (trajectory of 1),
A103122,
A103588,
A103589,
A103202 (sorted),
A103205 (base 10 version).
Related sequences (3):
A103747 (trajectory of 2),
A103621,
A103745,
A103615,
A103842,
A103863,
A104234,
A104235,
A103813,
A105023,
A105024,
A105025,
A105026,
A105027,
A105028.
Related sequences (5):
A105229,
A105271,
A104378,
A104401,
A104403,
A104489,
A104490,
A104853,
A104893,
A104894,
A105085.
-
a102370 n = a102370_list !! n
a102370_list = 0 : map (a105027 . toInteger) a062289_list
-- Reinhard Zumkeller, Jul 21 2012
-
A102370:=proc(n) local t1,l; t1:=n; for l from 1 to n do if n+l mod 2^l = 0 then t1:=t1+2^l; fi; od: t1; end;
-
f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; Table[ f[n] + n, {n, 0, 71}] (* Robert G. Wilson v, Mar 21 2005 *)
-
A102370(n)=n-1+sum(k=0,ceil(log(n+1)/log(2)),if((n+k)%2^k,0,2^k)) \\ Benoit Cloitre, Mar 20 2005
-
{a(n) = if( n<1, 0, sum( k=0, length( binary( n)), bitand( n + k, 2^k)))} /* Michael Somos, Mar 26 2012 */
-
def a(n): return 0 if n<1 else sum([(n + k)&(2**k) for k in range(len(bin(n)[2:]) + 1)]) # Indranil Ghosh, May 03 2017
A105158
Table T(n,k), read by downward antidiagonals, defined by : T(0,0) = 0, T(n,n) = 2^n for n>0, T(n,k) - T(n,n) = A102371(n - k) if 0<= k < n, T(n,k) - T(n,n) = A102370(k - n) if k >= n.
Original entry on oeis.org
0, 3, 3, 6, 2, 6, 5, 5, 5, 15, 4, 8, 4, 28, 15, 7, 7, 9, 23, 61, 10, 6, 10, 8, 18, 44, 126, 9, 17, 9, 11, 17, 39, 93, 251, 8, 12, 8, 14, 16, 34, 76, 190, 504, 11, 11, 19, 13, 19, 33, 71, 157, 379, 1017, 14, 10, 14, 12, 22, 32, 66, 140, 318, 760, 2042, 13, 13, 13, 23, 21, 35, 65
Offset: 0
Table T(n,k) begins:
0, 3, 6, 5, 4, 15, 10, 9, 8, 11, 14, 13, 28, ...
3, 2, 5, 8, 7, 6, 17, 12, 11, 10, 13, 16, 15, ...
6, 5, 4, 7, 10, 9, 8, 19, 14, 13, 12, 15, 18, ...
15, 10, 9, 8, 11, 14, 13, 12, 23, 18, 17, 16, 19, ...
28, 23, 18, 17, 16, 19, 22, 21, 20, 31, 26, 25, 24, ...
- David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [pdf, ps].
Showing 1-3 of 3 results.
Comments