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.

A084113 Number of multiplications when calculating A084110(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 4, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 5, 2, 2, 2, 4, 1, 5, 1, 4, 2, 2, 2, 6, 1, 2, 2, 5, 1, 5, 1, 4, 4, 2, 1, 6, 2, 4, 2, 4, 1, 5, 2, 5, 2, 2, 1, 7, 1, 2, 4, 4, 2, 5, 1, 4, 2, 5, 1, 7, 1, 2, 4, 4, 2, 5, 1, 6, 3, 2, 1, 7, 2, 2, 2, 5, 1, 7, 2, 4, 2, 2, 2, 7, 1, 4, 4, 6, 1, 5, 1, 5, 5
Offset: 1

Views

Author

Reinhard Zumkeller, May 12 2003

Keywords

Comments

a(n) = A000005(n)-1-A084114(n) = A032741(n)-A084114(n) = (A032741(n)+A084115(n))/2;
a(n) = 1 iff n is prime.

Crossrefs

Programs

  • Haskell
    a084113 = f 0 1 . a027750_row where
       f c _ []     = c
       f c x (d:ds) = if r == 0 then f c x' ds else f (c + 1) (x * d) ds
                      where (x', r) = divMod x d
    -- Reinhard Zumkeller, Jul 31 2014