cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A258009 If n <= 16, a(n) = n; for n > 16: a(16n + 6) = 16*n + 9, and for other cases with n > 16: a(2n) = 2*a(n), a(2n+1) = 2*a(n) + 1.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 25, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 41, 39, 40, 41, 42, 43, 50, 51, 46, 47, 48, 49, 50, 51, 52, 53, 57, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 73, 71, 72, 73, 74, 75, 82, 83, 78, 79, 80, 81, 82, 83, 84, 85, 89, 87, 100
Offset: 0

Views

Author

Antti Karttunen, May 31 2015

Keywords

Comments

Function a(n) rewrites in the binary representation of n the rightmost occurrence of substring "0110" to "1001", provided at least one such substring is present, otherwise fixes n.
The values 224694 and 486838 shown in the example section are capless and one-capped binary boundary codes for seven-hex polyhex-configuration called "crown" (the name employed for example in Guo et al paper) and the resulting values are the respective codes for one hex smaller polyhexes. The crown is one of the polyhexes that are too round that the related recurrence A254109 could make any dent in their boundary. Together with the latter can be used to obtain the terms of A258012, please see comments there.

Examples

			For n = 224694 ("110110110110110110" in binary) we rewrite the rightmost "0110" to "1001" resulting "110110110110111001" in binary, which is 224697 in decimal, thus a(224694) = 224697.
For n = 486838 ("1110110110110110110" in binary) we rewrite the rightmost "0110" to "1001" resulting "1110110110110111001" in binary, which is 486841 in decimal, thus a(486838) = 486841.
		

Crossrefs

Formula

If n <= 16, a(n) = n; for n > 16: a(16n + 6) = 16*n + 9, and for other cases with n > 16: a(2n) = 2*a(n), a(2n+1) = 2*a(n) + 1.