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

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

A361630 a(n) is the numerator of the median of the distinct prime factors of n.

Original entry on oeis.org

2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 9, 4, 2, 17, 5, 19, 7, 5, 13, 23, 5, 5, 15, 3, 9, 29, 3, 31, 2, 7, 19, 6, 5, 37, 21, 8, 7, 41, 3, 43, 13, 4, 25, 47, 5, 7, 7, 10, 15, 53, 5, 8, 9, 11, 31, 59, 3, 61, 33, 5, 2, 9, 3, 67, 19, 13, 5, 71, 5, 73, 39, 4, 21, 9, 3
Offset: 2

Views

Author

Stefano Spezia, Mar 18 2023

Keywords

Examples

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

Crossrefs

Cf. A001221, A027748, A323171, A361565, A361631 (denominator), A361632 (with multiplicity).

Programs

  • Mathematica
    a[n_]:=Numerator[Median[FactorInteger[n][[All, 1]]]]; Array[a,77,2]
  • PARI
    a(n)=my(f=factor(n)[,1]~, i=length(f)); numerator(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) = p.

A361725 a(n) is the largest of two middle prime factors of n if the number of prime divisors counted with multiplicity (A001222(n)) is even, otherwise is the middle prime factor of n.

Original entry on oeis.org

2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 2, 13, 7, 5, 2, 17, 3, 19, 2, 7, 11, 23, 2, 5, 13, 3, 2, 29, 3, 31, 2, 11, 17, 7, 3, 37, 19, 13, 2, 41, 3, 43, 2, 3, 23, 47, 2, 7, 5, 17, 2, 53, 3, 11, 2, 19, 29, 59, 3, 61, 31, 3, 2, 13, 3, 67, 2, 23, 5, 71, 2, 73, 37, 5, 2, 11, 3
Offset: 2

Views

Author

Stefano Spezia, Mar 22 2023

Keywords

Examples

			a(30) = a(2*3*5) = 3; a(60) = a(2*2*3*5) = 3; a(72) = a(2*2*2*3*3) = 2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,m;
      F:= sort(map(t -> t[1]$t[2],ifactors(n)[2]));
      m:= ceil((1+nops(F))/2);
      F[m]
    end proc:
    map(f, [$2..100]); # Robert Israel, May 19 2025
  • Mathematica
    f[n_] := Block[{p = Flatten[Table[#1, {#2}] & @@@ FactorInteger@ n], len}, len = Length@ p; If[OddQ@ len, p[[(1 + len)/2]], p[[len/2+1]]]]; Table[f@ n, {n, 2, 78}] (* After Michael De Vlieger in A079879 *)

Formula

a(n) = A027746(n, floor(A001222(n)/2) + 1).
a(n) = 2*A361632(n)/A361633(n) - A079879(n) if A001222(n) is even.
a(n) = A361632(n) if A001222(n) is odd.

A361650 Irregular triangle read by rows in which the row n lists the prime factors of n having the highest multiplicity.

Original entry on oeis.org

2, 3, 2, 5, 2, 3, 7, 2, 3, 2, 5, 11, 2, 13, 2, 7, 3, 5, 2, 17, 3, 19, 2, 3, 7, 2, 11, 23, 2, 5, 2, 13, 3, 2, 29, 2, 3, 5, 31, 2, 3, 11, 2, 17, 5, 7, 2, 3, 37, 2, 19, 3, 13, 2, 41, 2, 3, 7, 43, 2, 3, 2, 23, 47, 2, 7, 5, 3, 17, 2, 53, 3, 5, 11, 2, 3, 19, 2, 29, 59
Offset: 2

Views

Author

Stefano Spezia, Mar 19 2023

Keywords

Comments

The row n has length A001221(n) iff n is squarefree or a perfect power.

Examples

			The triangle begins:
   2;
   3;
   2;
   5;
   2, 3;
   7;
   2;
   3;
   2, 5;
  11;
   2;
  13;
   2, 7;
   3, 5;
   ...
The 12th row consists of {2} because 12 = 2*2*3, and the prime factor with the highest multiplicity is 2.
The 30th row consists of {2, 3, 5} because 30 = 2*3*5, and the prime factors with the highest multiplicity are 2, 3, and 5.
		

Crossrefs

Cf. A001221, A001222, A027746, A051903, A356838 (1st column), A356840 (rightmost term), A361632, A361633.

Programs

  • Mathematica
    r[n_]:=Commonest[Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]]; Flatten[Array[r,58,2]]
Showing 1-4 of 4 results.