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.

A285103 Number of odd terms on row n of A053632: a(n) = A000120(A068052(n)).

Original entry on oeis.org

1, 2, 4, 6, 6, 12, 12, 16, 22, 28, 32, 30, 36, 52, 48, 62, 62, 68, 88, 104, 116, 108, 128, 128, 132, 168, 160, 168, 200, 204, 240, 232, 242, 284, 300, 324, 332, 348, 352, 352, 412, 440, 400, 466, 460, 516, 496, 566, 582, 580, 608, 646, 676, 736, 716, 782, 728, 816, 832, 856, 916, 924, 948, 1034, 1008, 1044, 1096, 1154, 1112, 1212, 1204, 1188
Offset: 0

Views

Author

Antti Karttunen, Apr 15 2017

Keywords

Crossrefs

Number of odd term on row n of A053632.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          (t-> Bits[Xor](2^n*t, t))(b(n-1)))
        end:
    a:= n-> convert(Bits[Split](b(n)), `+`):
    seq(a(n), n=0..71);  # Alois P. Heinz, Mar 07 2024
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, With[{t = b[n-1]}, BitXor[2^n*t, t]]];
    a[n_] := DigitCount[b[n], 2, 1];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 17 2024, after Alois P. Heinz *)
  • Python
    # uses [A000120]
    l=[1]
    for n in range(1, 101):
        x = l[n - 1]
        l.append(x^(2**n*x))
    print([A000120(k) for k in l]) # Indranil Ghosh, Jun 28 2017
  • Scheme
    (define (A285103 n) (A000120 (A068052 n)))
    

Formula

a(n) = A000120(A068052(n)).
a(n) = A001221(A285102(n)) = A001222(A285102(n)).
A285104(n) = 2^n - a(n).
A000124(n) = a(n) + A285105(n).