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.

Showing 1-1 of 1 results.

A322183 A320890 in decimal representation.

Original entry on oeis.org

3, 6, 13, 55, 3557, 466333640, 137637397139039684081205979563
Offset: 1

Views

Author

Chai Wah Wu, Nov 30 2018

Keywords

Comments

If the terms of A320890 are considered as binary representations, then this sequence expresses these terms in decimal representation.

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))
    
Showing 1-1 of 1 results.