A322183 A320890 in decimal representation.
3, 6, 13, 55, 3557, 466333640, 137637397139039684081205979563
Offset: 1
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..9
Crossrefs
Cf. A320890.
Programs
-
Mathematica
FromDigits[#,2] &/@ Nest[Append[#, Flatten[IntegerDigits[#, 2] & /@ Table[Count[#, Last@ #] &@ #[[1 ;; k]], {k, Length@ #}]] &[#[[-1]] ] ] &, {{1, 1}}, 6] (* Amiram Eldar, Dec 02 2018 after Michael De Vlieger at A320890 *)
-
PARI
decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i]) replace(v) = my(w=[], zeros=0, ones=0); for(k=1, #v, if(v[k]==0, zeros++; w=concat(w, binary(zeros))); if(v[k]==1, ones++; w=concat(w, binary(ones)))); w terms(n) = my(v=[1, 1], i=0); while(i < n, print1(decimal(v, 2), ", "); i++; v=replace(v)) /* Print initial 7 terms as follows: */ terms(7) \\ Felix Fröhlich, Dec 01 2018
-
Python
A322183_list = [3] while len(A322183_list)<10: a0,a1,s = 0,0,'' for d in bin(A322183_list[-1])[2:]: if d == '0': a0 += 1 s += bin(a0)[2:] else: a1 += 1 s += bin(a1)[2:] A322183_list.append(int(s,2))
Comments