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.

A003960 Fully multiplicative with a(p) = [ (p+1)/2 ] for prime p.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 4, 3, 6, 2, 7, 4, 6, 1, 9, 4, 10, 3, 8, 6, 12, 2, 9, 7, 8, 4, 15, 6, 16, 1, 12, 9, 12, 4, 19, 10, 14, 3, 21, 8, 22, 6, 12, 12, 24, 2, 16, 9, 18, 7, 27, 8, 18, 4, 20, 15, 30, 6, 31, 16, 16, 1, 21, 12, 34, 9, 24, 12, 36, 4, 37, 19, 18, 10, 24, 14, 40, 3, 16, 21, 42, 8, 27
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A003970.

Programs

  • Mathematica
    f[p_, e_] := Floor[(p+1)/2]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 03 2023 *)
  • PARI
    { A003960(n) = my(f); f=factor(n/2^valuation(n, 2)); prod(i=1, matsize(f)[1], ((f[i, 1]+1)/2)^f[i, 2] ); } \\ Max Alekseyev, Jul 27 2017

Formula

If n = Product p(k)^e(k) then a(n) = Product [ (p(k)+1)/2 ]^e(k).
Multiplicative with a(p^e) = [(p+1)/2]^e. - David W. Wilson, Aug 01 2001
a(n) = 1 iff n is a power of 2 (A000079). - Michel Marcus, Nov 16 2017