cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A322183 A320890 in decimal representation.

This page as a plain text file.
%I A322183 #15 Dec 02 2018 18:44:15
%S A322183 3,6,13,55,3557,466333640,137637397139039684081205979563
%N A322183 A320890 in decimal representation.
%C A322183 If the terms of A320890 are considered as binary representations, then this sequence expresses these terms in decimal representation.
%H A322183 Chai Wah Wu, <a href="/A322183/b322183.txt">Table of n, a(n) for n = 1..9</a>
%t A322183 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 *)
%o A322183 (Python)
%o A322183 A322183_list = [3]
%o A322183 while len(A322183_list)<10:
%o A322183     a0,a1,s = 0,0,''
%o A322183     for d in bin(A322183_list[-1])[2:]:
%o A322183         if d == '0':
%o A322183             a0 += 1
%o A322183             s += bin(a0)[2:]
%o A322183         else:
%o A322183             a1 += 1
%o A322183             s += bin(a1)[2:]
%o A322183     A322183_list.append(int(s,2))
%o A322183 (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])
%o A322183 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
%o A322183 terms(n) = my(v=[1, 1], i=0); while(i < n, print1(decimal(v, 2), ", "); i++; v=replace(v))
%o A322183 /* Print initial 7 terms as follows: */
%o A322183 terms(7) \\ _Felix Fröhlich_, Dec 01 2018
%Y A322183 Cf. A320890.
%K A322183 nonn,base
%O A322183 1,1
%A A322183 _Chai Wah Wu_, Nov 30 2018