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
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
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]
MATHEMATICA
A295989row[n_] := Select[Range[0, n], BitAnd[#, n-#] == 0 &];
Array[A295989row, 25, 0] (* Paolo Xausa, Feb 24 2024 *)
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
First column of array in A352909.
Sequence in context: A221469 A350369 A117398 * A240852 A363612 A309816
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 12:15 EDT 2024. Contains 371969 sequences. (Running on oeis4.)