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-10 of 11 results. Next

A078174 Numbers with an integer arithmetic mean of distinct prime factors.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 33, 35, 37, 39, 41, 42, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 77, 78, 79, 81, 83, 84, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 110, 111, 113, 114, 115
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 20 2002

Keywords

Comments

A008472(a(n)) == 0 modulo A001221(a(n)).

Examples

			42=2*3*7: (2+3+7)/3=4, therefore 42 is a term.
		

Crossrefs

Union of A246655 and A070005.
Positions of 1's in A323172.
The version counting multiplicity is A078175.
The version for prime indices is A326621.
The average of the set of distinct prime factors is A323171/A323172.
The average of the multiset of prime factors is A123528/A123529.

Programs

  • Haskell
    a078174 n = a078174_list !! (n-1)
    a078174_list = filter (\x -> a008472 x `mod` a001221 x == 0) [2..]
    -- Reinhard Zumkeller, Jun 01 2013
  • Mathematica
    Select[Range[2,200],IntegerQ[Mean[Transpose[FactorInteger[#]][[1]]]]&] (* Harvey P. Dale, Apr 18 2016 *)
  • PARI
    is(n)=my(f=factor(n)[,1]);sum(i=1,#f,f[i])%#f==0 \\ Charles R Greathouse IV, May 30 2013
    

Formula

a(n) << n log n/(log log n)^k for any k. - Charles R Greathouse IV, May 30 2013

A326620 Denominator of the average of the set of distinct prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 14 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The distinct prime indices of 12 are {1,2}, with average 3/2, so a(12) = 2.
The sequence of fractions begins: 1, 2, 1, 3, 3/2, 4, 1, 2, 2, 5, 3/2, 6, 5/2, 5/2, 1, 7, 3/2, 8, 2, 3, 3, 9, 3/2, 3, 7/2, 2, 5/2, 10, 2.
		

Crossrefs

Positions of 1's are A326621.
The average of the multiset of prime indices is A326567/A326568.
The average of the multiset of prime factors is A123528/A123529.
The average of the set of distinct prime indices is A326619/A326620.
The average of the set of distinct prime factors is A323171/A323172.

Programs

  • Mathematica
    Table[Denominator[Mean[PrimePi/@First/@FactorInteger[n]]],{n,2,100}]
  • PARI
    A326620(n) = if(1==n,0,denominator(vecsum(apply(primepi,factor(n)[,1]))/omega(n))); \\ Antti Karttunen, Jan 28 2025

Extensions

Data section extended to a(105) by Antti Karttunen, Jan 28 2025

A326619 Numerator of the average of the set of distinct prime indices of n.

Original entry on oeis.org

1, 2, 1, 3, 3, 4, 1, 2, 2, 5, 3, 6, 5, 5, 1, 7, 3, 8, 2, 3, 3, 9, 3, 3, 7, 2, 5, 10, 2, 11, 1, 7, 4, 7, 3, 12, 9, 4, 2, 13, 7, 14, 3, 5, 5, 15, 3, 4, 2, 9, 7, 16, 3, 4, 5, 5, 11, 17, 2, 18, 6, 3, 1, 9, 8, 19, 4, 11, 8, 20, 3, 21, 13, 5, 9, 9, 3, 22, 2, 2, 7
Offset: 2

Views

Author

Gus Wiseman, Jul 14 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The distinct prime indices of 12 are {1,2}, with average 3/2, so a(12) = 3.
The sequence of fractions begins: 1, 2, 1, 3, 3/2, 4, 1, 2, 2, 5, 3/2, 6, 5/2, 5/2, 1, 7, 3/2, 8, 2, 3, 3, 9, 3/2, 3, 7/2, 2, 5/2, 10, 2.
		

Crossrefs

The average of the multiset of prime indices is A326567/A326568.
The average of the multiset of prime factors is A123528/A123529.
The average of the set of distinct prime indices is A326619/A326620.
The average of the set of distinct prime factors is A323171/A323172.

Programs

  • Mathematica
    Table[Numerator[Mean[PrimePi/@First/@FactorInteger[n]]],{n,2,100}]

A360459 Two times the median of the multiset of prime factors of n; a(1) = 2.

Original entry on oeis.org

2, 4, 6, 4, 10, 5, 14, 4, 6, 7, 22, 4, 26, 9, 8, 4, 34, 6, 38, 4, 10, 13, 46, 4, 10, 15, 6, 4, 58, 6, 62, 4, 14, 19, 12, 5, 74, 21, 16, 4, 82, 6, 86, 4, 6, 25, 94, 4, 14, 10, 20, 4, 106, 6, 16, 4, 22, 31, 118, 5, 122, 33, 6, 4, 18, 6, 134, 4, 26, 10, 142, 4, 146
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.

Examples

			The prime factors of 60 are {2,2,3,5}, with median 5/2, so a(60) = 5.
		

Crossrefs

The union is 2 followed by A014091, complement of A014092.
The prime factors themselves are listed by A027746, distinct A027748.
The version for divisors is A063655.
Positions of odd terms are A072978 (except 1).
For mean instead of twice median: A123528/A123529, distinct A323171/A323172.
Positions of even terms are A359913 (and 1).
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for distinct prime factors is A360458.
The version for prime multiplicities is A360460.
The version for 0-prepended differences is A360555.
A112798 lists prime indices, length A001222, sum A056239.
A325347 counts partitions with integer median, complement A307683.
A326567/A326568 gives mean of prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[2*Median[Join@@ConstantArray@@@FactorInteger[n]],{n,100}]

A360458 Two times the median of the set of distinct prime factors of n; a(1) = 2.

Original entry on oeis.org

2, 4, 6, 4, 10, 5, 14, 4, 6, 7, 22, 5, 26, 9, 8, 4, 34, 5, 38, 7, 10, 13, 46, 5, 10, 15, 6, 9, 58, 6, 62, 4, 14, 19, 12, 5, 74, 21, 16, 7, 82, 6, 86, 13, 8, 25, 94, 5, 14, 7, 20, 15, 106, 5, 16, 9, 22, 31, 118, 6, 122, 33, 10, 4, 18, 6, 134, 19, 26, 10, 142, 5
Offset: 1

Views

Author

Gus Wiseman, Feb 14 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length). Since the denominator is always 1 or 2, the median can be represented as an integer by multiplying by 2.

Examples

			The prime factors of 336 are {2,2,2,2,3,7}, with distinct parts {2,3,7}, with median 3, so a(336) = 6.
		

Crossrefs

The union is 2 followed by A014091, complement of A014092.
Distinct prime factors are listed by A027748.
The version for divisors is A063655.
Positions of odd terms are A100367.
For mean instead of two times median we have A323171/A323172.
The version for prime indices is A360005.
The version for distinct prime indices is A360457.
The version for prime factors is A360459.
The version for prime multiplicities is A360460.
Positions of even terms are A360552.
The version for 0-prepended differences is A360555.
A112798 lists prime indices, length A001222, sum A056239.
A304038 lists distinct prime indices.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Table[2*Median[First/@FactorInteger[n]],{n,100}]

A323171 Numerator of the average of distinct prime factors of n (A008472(n)/A001221(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, 10, 31, 2, 7, 19, 6, 5, 37, 21, 8, 7, 41, 4, 43, 13, 4, 25, 47, 5, 7, 7, 10, 15, 53, 5, 8, 9, 11, 31, 59, 10, 61, 33, 5, 2, 9, 16, 67, 19, 13, 14, 71, 5, 73, 39, 4, 21, 9, 6, 79, 7, 3, 43, 83, 4, 11, 45, 16, 13, 89, 10, 10, 25, 17, 49, 12, 5
Offset: 2

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Examples

			Fractions begins with 2, 3, 2, 5, 5/2, 7, 2, 3, 7/2, 11, 5/2, 13, ...
		

Crossrefs

Cf. A323172 (denominators).

Programs

  • Mathematica
    a[n_] := Numerator[Mean[FactorInteger[n][[;; , 1]]]]; Array[a, 100, 2] (* Amiram Eldar, Sep 17 2024 *)
  • PARI
    A008472(n) = vecsum(factor(n)[, 1]); \\ From A008472
    A323171(n) = (numerator(A008472(n)/omega(n)));

A360552 Numbers > 1 whose distinct prime factors have integer median.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 21, 23, 25, 27, 29, 30, 31, 32, 33, 35, 37, 39, 41, 42, 43, 45, 47, 49, 51, 53, 55, 57, 59, 60, 61, 63, 64, 65, 66, 67, 69, 70, 71, 73, 75, 77, 78, 79, 81, 83, 84, 85, 87, 89, 90, 91, 93, 95, 97, 99, 101, 102, 103
Offset: 1

Views

Author

Gus Wiseman, Feb 16 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime factors of 900 are {2,2,3,3,5,5}, with distinct parts {2,3,5}, with median 3, so 900 is in the sequence.
		

Crossrefs

For mean instead of median we have A078174, complement of A176587.
The complement is A100367 (without 1).
Positions of even terms in A360458.
- For divisors (A063655) we have A139711, complement A139710.
- For prime indices (A360005) we have A359908, complement A359912.
- For distinct prime indices (A360457) we have A360550, complement A360551.
- For distinct prime factors (A360458) we have A360552, complement A100367.
- For prime factors (A360459) we have A359913, complement A072978.
- For prime multiplicities (A360460) we have A360553, complement A360554.
- For 0-prepended differences (A360555) we have A360556, complement A360557.
A027746 lists prime factors, length A001222, indices A112798.
A027748 lists distinct prime factors, length A001221, indices A304038.
A323171/A323172 = mean of distinct prime factors, indices A326619/A326620.
A325347 = partitions w/ integer median, complement A307683, strict A359907.
A359893 and A359901 count partitions by median, odd-length A359902.

Programs

  • Mathematica
    Select[Range[2,100],IntegerQ[Median[First/@FactorInteger[#]]]&]

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

A363895 Floor of the average of the distinct prime factors of n.

Original entry on oeis.org

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

Views

Author

DarĂ­o Clavijo, Jun 26 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[Mean[FactorInteger[n][[;; , 1]]]]; Array[a, 100, 2] (* Amiram Eldar, Jun 27 2023 *)
  • PARI
    a(n) = my(p = factor(n)[, 1]); vecsum(p)\#p; \\ Amiram Eldar, Jun 29 2023
  • Python
    from sympy import factorint
    def a(n):
      P = factorint(n).keys()
      return int(sum(P)/len(P))
    print([a(n) for n in range(2, 85)])
    

Formula

a(p^n) = p, p prime, n >= 1.
a(n) = floor(A008472(n)/A001221(n)).
a(n) = floor(A323171(n)/A323172(n)).

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-10 of 11 results. Next