login
A356965
a(n) is the sum of the tribonacci numbers in common in the greedy and lazy tribonacci representations of n.
2
0, 1, 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, 12, 0, 1, 15, 16, 17, 18, 19, 13, 21, 22, 23, 0, 1, 2, 3, 28, 29, 30, 24, 32, 33, 34, 35, 36, 24, 25, 39, 40, 41, 42, 43, 0, 1, 2, 3, 4, 5, 6, 7, 52, 53, 54, 55, 56, 44, 45, 59, 60, 61, 62, 63, 57, 65, 66, 67, 44, 45, 46
OFFSET
0,3
COMMENTS
This sequence is to tribonacci numbers (A000073) what A356771 is to Fibonacci numbers (A000045).
FORMULA
a(n) = A356964(A003796(n+1) AND A003726(n+1)) (where AND denotes the bitwise AND operator).
a(n) <= n with equality iff n belongs to A356899.
a(n) = 0 iff n belongs to A356966.
EXAMPLE
For n = 58:
- with T = A000073,
- the greedy representation of 58 is: T(9) + T(7) + T(3),
- the lazy representation of 58 is: T(9) + T(6) + T(5) + T(4) + T(3),
- so a(59) = T(9) + T(3) = 45.
PROG
(PARI) See Links section.
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 06 2022
STATUS
approved