|
|
A297155
|
|
a(1) = a(2) = 0, after which, a(n) = 1+a(n/2) if n is of the form 4k+2, otherwise a(n) = a(A252463(n)).
|
|
5
|
|
|
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 2, 0, 1, 0, 1, 1, 1, 1, 2, 0, 1, 0, 1, 0, 2, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 0, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,30
|
|
COMMENTS
|
Consider the binary tree illustrated in A005940: If we start from any vertex containing n, computing successive iterations of A252463 until 1 is reached, a(n) gives the number of the numbers of the form 4k+2 (with k >= 1) encountered on the path (i.e., excluding 2 from the count but including the starting n if it is of the form 4k+2).
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
(Scheme, with memoization-macro definec) (definec (A297155 n) (cond ((<= n 2) 0) ((= 2 (modulo n 4)) (+ 1 (A297155 (/ n 2)))) (else (A297155 (A252463 n)))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|