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-2 of 2 results.

A255308 Number of times log_2 can be applied to n until the result is not a power of 2. Here log_2 means the base-2 logarithm.

Original entry on oeis.org

0, 1, 2, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Paul Boddington, Feb 20 2015

Keywords

Comments

Multiplicative because only powers of two have a nonzero value. - Andrew Howroyd, Jul 27 2018

Crossrefs

One less than A293668.

Programs

  • PARI
    a(n) = if(n < 1, 0, my(e=valuation(n, 2)); if(n == 2^e, 1 + a(e), 0)) \\ Andrew Howroyd, Jul 27 2018

Formula

a(n) = 1 + a(log_2(n)) if n is a power of 2, 0 otherwise.

Extensions

Extended up to a(128) by Antti Karttunen, Sep 30 2018

A292046 The list of distinct values of A072464.

Original entry on oeis.org

1, 3, 6, 7, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79
Offset: 1

Views

Author

Khalil Fazal, Sep 11 2017

Keywords

Comments

Distinct lengths taken by the Elias omega coding.

Crossrefs

The list of distinct values of A072464. First differences are A293668.

Programs

  • Python
    from math import log
    a = [1]
    for i in range(1, 66): a.append(i+a[int(log(i, 2))]+1)
    print(a)
    # Andrey Zabolotskiy, Sep 18 2017

Extensions

a(26)-a(66) from Andrey Zabolotskiy, Sep 18 2017
Showing 1-2 of 2 results.