login
A372352
The difference between n and the largest term of A086893 <= n.
3
0, 1, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6
OFFSET
1,7
PROG
(PARI)
A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3); \\ From A086893
A372352(n) = { my(k); for(i=1, oo, k=A086893(i); if(k>n, return(n-A086893(i-1)))); };
CROSSREFS
Cf. also A372286.
Sequence in context: A037886 A031045 A010877 * A309959 A257848 A195831
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen (proposed by Ali Sada), Apr 29 2024
STATUS
approved