A105035 Positions of record values in A104234.
0, 1, 5, 2037
Offset: 1
Keywords
Links
Formula
Extensions
Offset corrected by Max Alekseyev, Mar 17 2023
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.
........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.
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
For n = 11 solutions are i = 0, 8 and 10. Four solutions occur for the first time at n = 2059: they are i = 0, 2048, 2056, 2058. Five solutions occur for the first time at n = 2^2059 + 2059 (see A034797).
f:= proc (n) local t1, l; t1 := 0; for l to n do if `mod`(n-l,2^l) = 0 then t1 := t1+1 end if end do; t1 end proc;
f[n_] := Block[{c = 1, k = Max[1, n - Floor[ Log[2, n] + 2]]}, While[k < n, If[ Mod[k, 2^(n - k)] == 0, c++ ]; k++ ]; c]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Mar 21 2005 *)
The array starts (first row: m=2) [ 0 1 2 2 3 2 3 4 2 3 4 4 5 2 3 4 4 5 4 5 6 2 3 4 4 ...] [ 0 1 2 2 3 3 3 4 5 3 4 5 3 4 5 5 6 3 4 5 5 6 3 4 5 ...] [ 0 1 2 3 2 3 4 3 4 4 5 6 7 4 4 5 6 7 4 5 6 7 6 7 8 ...] [ 0 1 2 3 4 2 3 4 5 3 4 5 5 6 7 8 9 4 5 5 6 7 8 9 5 ...] [ 0 1 2 3 4 5 2 3 4 5 6 3 4 5 6 6 7 8 9 10 11 4 5 6 6 ...] [ 0 1 2 3 4 5 6 2 3 4 5 6 7 3 4 5 6 7 7 8 9 10 11 12 13 ...] [ 0 1 2 3 4 5 6 7 2 3 4 5 6 7 8 3 4 5 6 7 8 8 9 10 11 ...] [ 0 1 2 3 4 5 6 7 8 2 3 4 5 6 7 8 9 3 4 5 6 7 8 9 9 ...] [ 0 1 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 10 3 4 5 6 7 8 ...] [ 0 1 2 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8 9 10 11 3 4 5 6 ...] [ 0 1 2 3 4 5 6 7 8 9 10 11 2 3 4 5 6 7 8 9 10 11 12 3 4 ...] [ 0 1 2 3 4 5 6 7 8 9 10 11 12 2 3 4 5 6 7 8 9 10 11 12 13 ...] ... It is easy to prove that row m starts with (0, ..., m-1; 2, ..., m; 3, ..., m; m, ..., 2m-1; ...).
A289281_row(n=30,k=2,a=[0])={while(#a
Comments