OFFSET
1,1
COMMENTS
A comparison of this sequence with A067368 suggests the following conjecture: a(n)=2*A067368(n)+n-1. This has been confirmed for several hundred terms.
Above conjecture is true, and it is same as conjecture in Formula section of A067368. - Altug Alkan, Sep 26 2018
The asymptotic density of this sequence is 1/8. - Amiram Eldar, May 31 2024
LINKS
Altug Alkan, Table of n, a(n) for n = 1..1000
EXAMPLE
A067395 begins {4,4,4,2,2,4,4,4,4,...}, so a(1)=4.
PROG
(Python)
def A067396(n):
def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0, x.bit_length(), 3))
m, k = n, f(n)
while m != k: m, k = k, f(k)
return (m<<2)+n-1 # Chai Wah Wu, Feb 17 2025
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
John W. Layman, Jan 22 2002
STATUS
approved