[go: up one dir, main page]

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!)
A303536 Number of terms in greedy partition of n into binary palindromes. 2
0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 1, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
The definition and early trajectory are strikingly reminiscent of A259656. The first difference between the two sequences is at n = 38, where A259656 has 4 and this sequence has 2.
Start with n, and repeatedly subtract the largest possible binary palindrome that leaves a nonnegative residue. This sequence gives the number of such steps needed to reach 0.
This sequence is unbounded, since the gaps between binary palindromes are arbitrarily large, but it grows very slowly.
If we search for the smallest partition into binary palindromes, not necessarily greedy, we get another sequence dominated by this one. The first difference is at n = 44. It is believed that this smaller sequence is bounded, but I have not been able to find a claim of the maximum. See Cilleruelo and Luca 2016.
The position where n = 0.. occurs for the first time: 0, 1, 2, 11, 44, 557, 131630, ... - Antti Karttunen and Altug Alkan, May 13 2018
LINKS
Javier Cilleruelo and Florian Luca, Every Positive Integer is a Sum of Three Palindromes.
FORMULA
a(0) = 0; for n > 0, a(n) = 1 + a(A303534(n)). [We are iterating the map n -> A303534(n) until zero is reached.] - Antti Karttunen, May 13 2018, after an earlier comment.
EXAMPLE
For n = 44:
The largest palindrome not exceeding 44 is 33 (100001). 44 - 33 = 11.
The largest palindrome not exceeding 11 is 9 (1001). 11 - 9 = 2.
The largest palindrome not exceeding 2 is 1. 2 - 1 = 1.
The largest palindrome not exceeding 1 is 1. 1 - 1 = 0.
The iteration took 4 steps to reach 0, so a(44) = 4.
For n = 131630; A303534(131630) = 557 and A303534(557) = 44. Since a(44) = 4 (as above), a(557) = 5 and a(131630) = 6. - Altug Alkan, Apr 26 2018
PROG
(PARI)
isA006995(n) = Vecrev(n=binary(n))==n;
A303534(n) = {my(k=0); while(!isA006995(n-k), k++); k; } \\ From A303534
A303536(n) = if(!n, n, 1+A303536(A303534(n))); \\ Antti Karttunen, May 13 2018
CROSSREFS
Cf. A006995 (binary palindromes), A206913, A259656, A303534.
Sequence in context: A245192 A235431 A354599 * A259656 A096370 A330721
KEYWORD
nonn,base,easy
AUTHOR
Allan C. Wechsler, Apr 25 2018
EXTENSIONS
More terms from Altug Alkan, Apr 25 2018
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 August 30 21:29 EDT 2024. Contains 375550 sequences. (Running on oeis4.)