OFFSET
1,3
COMMENTS
Conjecture: sequence is weakly increasing.
LINKS
Robert Israel, Table of n, a(n) for n = 1..3000
MAPLE
MATHEMATICA
a[1]=1; a[2]=2; a[n_]:=a[n]=FromDigits[Flatten[IntegerDigits[#, 2]&/@Table[a[k], {k, n-1}]][[;; n]], 2]-Total@Table[a[m], {m, n-1}]
Count[#, 1]&/@Table[IntegerDigits[a[l], 2], {l, 70}] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
PROG
(Python)
def aupton(terms):
alst, bstr = [1, 1], "110"
for n in range(3, terms+1):
an = int(bstr[:n], 2) - int(bstr[:n-1], 2)
binan = bin(an)[2:]
alst, bstr = alst + [binan.count('1')], bstr + binan
return alst
print(aupton(68)) # Michael S. Branicky, Mar 30 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Peter Kagey, Jun 10 2019
STATUS
approved