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.

A291771 Filter based on runlengths of 0-digits in base-3 expansion of n: a(n) = A278222(A291770(n)).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 2, 1, 1, 8, 4, 4, 6, 2, 2, 6, 2, 2, 4, 2, 2, 2, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 2, 1, 1, 8, 4, 4, 6, 2, 2, 6, 2, 2, 4, 2, 2, 2, 1, 1, 2, 1, 1, 4, 2, 2, 2, 1, 1, 2, 1, 1, 16, 8, 8, 12, 4, 4, 12, 4, 4, 12, 6, 6, 6, 2, 2, 6, 2, 2, 12, 6, 6, 6, 2, 2, 6
Offset: 1

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; Array[If[# == 1, 1, Times @@ MapIndexed[Prime[First[#2]]^#1 &, Sort[FactorInteger[#][[All, -1]], Greater]]] &@ f[FromDigits[IntegerDigits[#, 3] /. k_ /; k < 3 :> If[k == 0, 1, 0], 2], 1, 1] &, 96] (* Michael De Vlieger, Sep 11 2017 *)

Formula

a(n) = A278222(A291770(n)).