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.

A067629 The average of the prime factors of n, rounded off to the nearest integer (rounding up if there's a choice), with each factor weighted according to its frequency of occurrence in the prime factorization.

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Feb 02 2002

Keywords

Examples

			24 = 2^3 * 3^1, so the average of the prime factors = (2 + 2 + 2 + 3)/4, which rounded = 2. So a(24) = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 2 to 150 do printf(`%d,`,round(sum(ifactors(n)[2][i][1]*ifactors(n)[2][i][2], i=1..nops(ifactors(n)[2]))/sum(ifactors(n)[2][i][2], i=1..nops(ifactors(n)[2]) ) )) od:
  • Mathematica
    a[n_] := Floor[1/2+(Plus@@(Times@@#&/@(fn=FactorInteger[n])))/(Plus@@Last/@fn)]

Extensions

Edited by Dean Hickerson and James Sellers, Feb 12 2002

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)).

A364156 Ceiling of the mean of the prime factors of n (with multiplicity).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 18 2023

Keywords

Examples

			The prime factors of 450 are {2,3,3,5,5}, with mean 18/5, so a(450) = 4.
		

Crossrefs

For median of prime indices we have triangle A124944, low A124943.
The round version is A067629.
The floor version is A126594.
A027746 lists prime factors, indices A112798.
A078175 lists numbers with integer mean of prime factors.
A123528/A123529 gives mean of prime factors, A326567/A326568 prime indices.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[If[n==1,0,Ceiling[Mean[prifacs[n]]]],{n,100}]

Formula

Ceiling of A123528(n)/A123529(n).

A364157 Numbers whose rounded-down (floor) mean of prime factors (with multiplicity) is 2.

Original entry on oeis.org

2, 4, 6, 8, 12, 16, 18, 24, 32, 36, 40, 48, 54, 64, 72, 80, 96, 108, 120, 128, 144, 160, 162, 192, 216, 224, 240, 256, 288, 320, 324, 360, 384, 432, 448, 480, 486, 512, 576, 640, 648, 672, 720, 768, 800, 864, 896, 960, 972, 1024, 1080, 1152, 1280, 1296, 1344
Offset: 1

Views

Author

Gus Wiseman, Jul 18 2023

Keywords

Examples

			The terms together with their prime factors begin:
   2 = 2
   4 = 2*2
   6 = 2*3
   8 = 2*2*2
  12 = 2*2*3
  16 = 2*2*2*2
  18 = 2*3*3
  24 = 2*2*2*3
  32 = 2*2*2*2*2
  36 = 2*2*3*3
  40 = 2*2*2*5
  48 = 2*2*2*2*3
  54 = 2*3*3*3
  64 = 2*2*2*2*2*2
  72 = 2*2*2*3*3
  80 = 2*2*2*2*5
  96 = 2*2*2*2*2*3
		

Crossrefs

Without multiplicity we appear to have A007694.
Prime factors are listed by A027746, indices A112798.
Positions of 2's in A126594, positions of first appearances A364037.
For prime indices and ceiling we have A363950, counted by A026905.
For prime indices we have A363954 (or A363949), counted by A363745.
A078175 lists numbers with integer mean of prime factors.
A123528/A123529 gives mean of prime factors, indices A326567/A326568.
A316413 ranks partitions with integer mean, counted by A067538.
A363895 gives floor of mean of distinct prime factors.
A363943 gives floor of mean of prime indices, ceiling A363944.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Select[Range[100],Floor[Mean[prifacs[#]]]==2&]
Showing 1-4 of 4 results.