|
|
A206921
|
|
Rank of the n-th binary palindrome. The minimal number of iterations A206915(A206915(...A206915(A006995(n))...) such that the result is not a binary palindrome, a(3)=1.
|
|
2
|
|
|
2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n)=k, where k can be determined by the following iteration: set k=0, p(0)=A006995(n). Repeat while A178225(p(k))==1, set k=k+1, p(k)=A206915(p(k-1)) end repeat [for n<>3].
Recursion for n<>3:
Case 1: a(n)=1, if n is not a binary palindrome;
Case 2: a(n)=a(A206915(n))+1, else.
|
|
EXAMPLE
|
a(3)=1 by definition;
a(4)=1, since A006995(4)=5=A006995(4) [==> 1 iteration; 4 is not a binary palindrome];
|
|
PROG
|
/* C program fragment, omitting formal details, n!=3 */
k=0;
{
k++;
}
return k;
(PARI)
up_to = 65537;
A178225(n) = (Vecrev(n=binary(n))==n);
A206915list(up_to) = { my(v=vector(up_to+1), s=0); for(n=1, up_to+1, s += A178225(n-1); v[n] = s); (v); };
v206915 = A206915list(up_to);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|