OFFSET
1,1
COMMENTS
These are the indices to A193231 where the count of 1-bits in its terms changes by more than one.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Joerg Arndt, Matters Computational (The Fxtbook), section 1.19, "Invertible transforms on words", pp. 49--55. [This sequence appears on page 50]
EXAMPLE
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(Python)
def a065621(n): return n^(2*(n - (n&-n)))
def a048724(n): return n^(2*n)
def a193231(n):
if n<2: return n
if n%2==0: return a048724(a193231(n//2))
else: return a065621(1 + a193231((n - 1)//2))
def a234022(n): return bin(a193231(n))[2:].count("1")
def ok(n): return abs(a234022(n) - a234022(n + 1))>1
print([n for n in range(1, 1501) if ok(n)]) # Indranil Ghosh, Jun 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 28 2013
STATUS
approved