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.

A361566 a(n) is the denominator of the median of divisors of n.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 1

Views

Author

Stefano Spezia, Mar 15 2023

Keywords

Comments

a(n) = 2 if n is in A139710, otherwise a(n) = 1. - Robert Israel, Mar 15 2023

Examples

			a(9) = 1 since the divisors of 9 are 1, 3, 9, and their median is 3.
a(12) = 2 since the divisors of 12 are 1, 2, 3, 4, 6, 12, and their median is 7/2.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Denominator[Median[Divisors[n]]]; Array[a,88]
  • PARI
    a(n) = my(d=divisors(n), m=#d+1); denominator((d[m\2] + d[m-m\2])/2); \\ Michel Marcus, Mar 16 2023

Formula

a(n) = denominator((A033676(n) + A033677(n))/2).
Except for p = 2 and k = 1, a(p^k) = 1, if p is a prime.