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

A361565 a(n) is the numerator of the median of divisors of n.

Original entry on oeis.org

1, 3, 2, 2, 3, 5, 4, 3, 3, 7, 6, 7, 7, 9, 4, 4, 9, 9, 10, 9, 5, 13, 12, 5, 5, 15, 6, 11, 15, 11, 16, 6, 7, 19, 6, 6, 19, 21, 8, 13, 21, 13, 22, 15, 7, 25, 24, 7, 7, 15, 10, 17, 27, 15, 8, 15, 11, 31, 30, 8, 31, 33, 8, 8, 9, 17, 34, 21, 13, 17, 36, 17, 37, 39, 10
Offset: 1

Views

Author

Stefano Spezia, Mar 15 2023

Keywords

Examples

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

Crossrefs

Programs

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

Formula

a(n) = numerator((A033676(n) + A033677(n))/2).
a(p) = (1 + p)/2 if p is an odd prime.
For p a prime, a(p^k) = (p^((k-1)/2) + p^((k+1)/2))/2 if k is odd, a(p^k) = p^(k/2) if k is even.

A361633 a(n) is the denominator of the median of the prime factors of n with repetition.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Mar 18 2023

Keywords

Examples

			a(12) = 1 since 12 = 2*2*3, and the median of the factors is equal to 2/1.
a(36) = 2 since 30 = 2*2*3*3, and the median of the factors is equal to 5/2.
		

Crossrefs

Cf. A001222, A027746, A079879, A323172, A361566, A361631 (without repetition), A361632 (numerator), A361725.

Programs

  • Mathematica
    a[n_]:=Denominator[Median[Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]]]; Array[a,88,2]

Formula

For p a prime, a(p^k) = 1.
a(n) = denominator((A079879(n) + A361725(n))/2).

Extensions

Example corrected by Peter Munn, Aug 04 2024

A361631 a(n) is the denominator of the median of the distinct prime factors of n.

Original entry on oeis.org

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

Views

Author

Stefano Spezia, Mar 18 2023

Keywords

Examples

			a(12) = 2 since the distinct prime factors of 12 are 2 and 3, of median equal to 5/2.
a(30) = 1 since the distinct prime factors of 30 are 2, 3, and 5, of median equal to 3.
		

Crossrefs

Cf. A001221, A027748, A323172, A361566, A361630 (numerator), A361633 (with multiplicity).

Programs

  • Mathematica
    a[n_]:=Denominator[Median[FactorInteger[n][[All, 1]]]]; Array[a,88,2]
  • PARI
    a(n)=my(f=factor(n)[,1]~, i=length(f)); denominator(if(i%2, f[i\2+1], (f[i/2]+f[i/2+1])/2)) \\ Winston de Greef, Mar 23 2023

Formula

For p a prime, a(p^k) = 1.
Showing 1-3 of 3 results.