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!)
A295989 Irregular triangle T(n, k), read by rows, n >= 0 and 0 <= k < A001316(n): T(n, k) is the (k+1)-th nonnegative number m such that n AND m = m (where AND denotes the bitwise AND operator). 12

%I #32 Feb 24 2024 20:59:41

%S 0,0,1,0,2,0,1,2,3,0,4,0,1,4,5,0,2,4,6,0,1,2,3,4,5,6,7,0,8,0,1,8,9,0,

%T 2,8,10,0,1,2,3,8,9,10,11,0,4,8,12,0,1,4,5,8,9,12,13,0,2,4,6,8,10,12,

%U 14,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0

%N Irregular triangle T(n, k), read by rows, n >= 0 and 0 <= k < A001316(n): T(n, k) is the (k+1)-th nonnegative number m such that n AND m = m (where AND denotes the bitwise AND operator).

%C The (n+1)-th row has A001316(n) terms and sums to n * A001316(n) / 2.

%C For any n >= 0 and k such that 0 <= k < A001316(n):

%C - if A000120(n) > 0 then T(n, 1) = A006519(n),

%C - if A000120(n) > 1 then T(n, 2) = 2^A285099(n),

%C - if A000120(n) > 0 then T(n, A001316(n)/2 - 1) = A053645(n),

%C - if A000120(n) > 0 then T(n, A001316(n)/2) = 2^A000523(n),

%C - if A000120(n) > 0 then T(n, A001316(n) - 2) = A129760(n),

%C - T(n, A001316(n) - 1) = n,

%C - the six previous relations correspond respectively (when applicable) to the second term, the third term, the pair of central terms, the penultimate term and the last term of a row,

%C - T(n, k) AND T(n, A001316(n) - k - 1) = 0,

%C - T(n, k) + T(n, A001316(n) - k - 1) = n,

%C - T(n, k) = k for any k < A006519(n+1),

%C - A000120(T(n, k)) = A000120(k).

%C If we plot (n, T(n,k)) then we obtain a skewed Sierpinski triangle (see Links section).

%C If interpreted as a flat sequence a(n) for n >= 0:

%C - a(n) = 0 iff n = A006046(k) for some k >= 0,

%C - a(n) = 1 iff n = A006046(2*k + 1) + 1 for some k >= 0,

%C - a(A006046(k) - 1) = k - 1 for any k > 0.

%H Rémy Sigrist, <a href="/A295989/b295989.txt">Rows n = 0..256, flattened</a>

%H Rémy Sigrist, <a href="/A295989/a295989.png">Scatterplot of (n, T(n, k)) for n = 0..1023 and k = 0..A001316(n)-1</a>

%F For any n >= 0 and k such that 0 <= k < A001316(n):

%F - T(n, 0) = 0,

%F - T(2*n, k) = 2*T(n, k),

%F - T(2*n+1, 2*k) = 2*T(n, k),

%F - T(2*n+1, 2*k+1) = 2*T(n, k) + 1.

%e Triangle begins:

%e 0: [0]

%e 1: [0, 1]

%e 2: [0, 2]

%e 3: [0, 1, 2, 3]

%e 4: [0, 4]

%e 5: [0, 1, 4, 5]

%e 6: [0, 2, 4, 6]

%e 7: [0, 1, 2, 3, 4, 5, 6, 7]

%e 8: [0, 8]

%e 9: [0, 1, 8, 9]

%e 10: [0, 2, 8, 10]

%e 11: [0, 1, 2, 3, 8, 9, 10, 11]

%e 12: [0, 4, 8, 12]

%e 13: [0, 1, 4, 5, 8, 9, 12, 13]

%e 14: [0, 2, 4, 6, 8, 10, 12, 14]

%e 15: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]

%t A295989row[n_] := Select[Range[0, n], BitAnd[#, n-#] == 0 &];

%t Array[A295989row, 25, 0] (* _Paolo Xausa_, Feb 24 2024 *)

%o (PARI) T(n,k) = if (k==0, 0, n%2==0, 2*T(n\2,k), k%2==0, 2*T(n\2, k\2), 2*T(n\2, k\2)+1)

%Y Cf. A000120, A000523, A001316 (row lengths), A006046, A006519, A053645, A129760, A285099.

%Y First column of array in A352909.

%K nonn,tabf,look,base

%O 0,5

%A _Rémy Sigrist_, Dec 02 2017

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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)