The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 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). 4
 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, 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, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS The (n+1)-th row has A001316(n) terms and sums to n * A001316(n) / 2. For any n >= 0 and k such that 0 <= k < A001316(n): - if A000120(n) > 0 then T(n, 1) = A006519(n), - if A000120(n) > 1 then T(n, 2) = 2^A285099(n), - if A000120(n) > 0 then T(n, A001316(n)/2 - 1) = A053645(n), - if A000120(n) > 0 then T(n, A001316(n)/2) = 2^A000523(n), - if A000120(n) > 0 then T(n, A001316(n) - 2) = A129760(n), - T(n, A001316(n) - 1) = n, - 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, - T(n, k) AND T(n, A001316(n) - k - 1) = 0, - T(n, k) + T(n, A001316(n) - k - 1) = n, - T(n, k) = k for any k < A006519(n+1), - A000120(T(n, k)) = A000120(k). If we plot (n, T(n,k)) then we obtain a skewed Sierpinski triangle (see Links section). If interpreted as a flat sequence a(n) for n >= 0: - a(n) = 0 iff n = A006046(k) for some k >= 0, - a(n) = 1 iff n = A006046(2*k + 1) + 1 for some k >= 0, - a(A006046(k) - 1) = k - 1 for any k > 0. LINKS Rémy Sigrist, Rows n = 0..256, flattened FORMULA For any n >= 0 and k such that 0 <= k < A001316(n): - T(n, 0) = 0, - T(2*n, k) = 2*T(n, k), - T(2*n+1, 2*k) = 2*T(n, k), - T(2*n+1, 2*k+1) = 2*T(n, k) + 1. EXAMPLE Triangle begins:   0:   [0]   1:   [0, 1]   2:   [0, 2]   3:   [0, 1, 2, 3]   4:   [0, 4]   5:   [0, 1, 4, 5]   6:   [0, 2, 4, 6]   7:   [0, 1, 2, 3, 4, 5, 6, 7]   8:   [0, 8]   9:   [0, 1, 8, 9]   10:  [0, 2, 8, 10]   11:  [0, 1, 2, 3, 8, 9, 10, 11]   12:  [0, 4, 8, 12]   13:  [0, 1, 4, 5, 8, 9, 12, 13]   14:  [0, 2, 4, 6, 8, 10, 12, 14]   15:  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] PROG (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) CROSSREFS Cf. A000120, A000523, A001316 (row lengths), A006046, A006519, A053645, A129760, A285099. Sequence in context: A308625 A221469 A117398 * A240852 A309816 A071486 Adjacent sequences:  A295986 A295987 A295988 * A295990 A295991 A295992 KEYWORD nonn,tabf,look,base AUTHOR Rémy Sigrist, Dec 02 2017 STATUS approved

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

Last modified June 22 09:57 EDT 2021. Contains 345375 sequences. (Running on oeis4.)