OFFSET
1,2
COMMENTS
For n>=0, row n is the ordered sequence of positive integers m such that the number of odd powers of 2 in the base 2 representation of m is n.
Every positive integer occurs exactly once in the array, so that as a sequence it is a permutation of the positive integers.
For even powers, see A165274. For the number of even powers of 2 in the base 2 representation of n, see A139351; for odd, see A139352.
It appears that, for n>=3, a(t(n)) = 4*a(t(n-1))+2, where t(n) is the n-th triangular number t(n)=n(n+1)/2 (A000217). [John W. Layman, Sep 15 2009]
EXAMPLE
Northwest corner:
1....4....5...16...17...20...21...64
2....3....6....7....8....9...12...13
10..11...14...26...27...30...31...34
42..43...46...47...58...59...62...63
Examples:
20 = 16 + 4 = 2^4 + 2^2, so that 20 is in row 0.
13 = 8 + 4 + 1 = 2^3 + 2^2 + 2^0, so that 13 is in row 1.
MATHEMATICA
f[n_] := Total[(Reverse@IntegerDigits[n, 2])[[2 ;; -1 ;; 2]]]; T = GatherBy[ SortBy[Range[10^5], f], f]; Table[Table[T[[n - k + 1, k]], {k, n, 1, -1}], {n, 1, Length[T]}] // Flatten (* Amiram Eldar, Feb 04 2020*)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Sep 12 2009
EXTENSIONS
a(27) corrected and a(28)-a(54) added by John W. Layman, Sep 15 2009
More terms from Amiram Eldar, Feb 04 2020
STATUS
approved