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.

Previous Showing 21-30 of 34 results. Next

A070005 Arithmetic mean of prime factors of n is an integer and n is neither a prime nor power of a prime.

Original entry on oeis.org

15, 21, 33, 35, 39, 42, 45, 51, 55, 57, 63, 65, 69, 75, 77, 78, 84, 85, 87, 91, 93, 95, 99, 105, 110, 111, 114, 115, 117, 119, 123, 126, 129, 133, 135, 141, 143, 145, 147, 153, 155, 156, 159, 161, 168, 170, 171, 175, 177, 183, 185, 186, 187, 189, 195, 201, 203
Offset: 1

Views

Author

Labos Elemer, Apr 11 2002

Keywords

Examples

			n=33=3*11, mean=(3+11)/2=6.
		

Crossrefs

Cf. A000961, A010055; subsequence of A078174.

Programs

  • Haskell
    a070005 n = a070005_list !! (n-1)
    a070005_list = filter ((== 0) . a010055) a078174_list
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] Do[s=Apply[Plus, ba[n]]/lf[n]; If[IntegerQ[s]&&Greater[lf[n], 1], Print[n]], {n, 2, 1000}]
  • PARI
    lista(nn) = {for (n=2, nn, f = factor(n); if ((#f~ != 1) && (sum(k=1, #f~, f[k,1]) % #f~ == 0), print1(n, ", ")););} \\ Michel Marcus, Mar 28 2015

A176587 Numbers such that arithmetic mean of distinct prime factors is not an integer.

Original entry on oeis.org

1, 6, 10, 12, 14, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 66, 68, 70, 72, 74, 76, 80, 82, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 112, 116, 118, 120, 122, 124, 130, 132, 134, 136, 138, 140, 142, 144
Offset: 1

Views

Author

Jaroslav Krizek, Apr 21 2010

Keywords

Comments

Complement of A078174.

Examples

			For a(14) = 36: 36 = 2^2*3^3; (2+3)/2 is not integer.
		

Programs

  • Mathematica
    Join[{1},Select[Range[300],!IntegerQ[Mean[FactorInteger[#][[All,1]]]]&]] (* Harvey P. Dale, Aug 05 2022 *)

Extensions

Corrected and extended by Harvey P. Dale, Aug 05 2022

A357710 Number of integer compositions of n with integer geometric mean.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 4, 8, 4, 15, 17, 22, 48, 40, 130, 88, 287, 323, 543, 1084, 1145, 2938, 3141, 6928, 9770, 15585, 29249, 37540, 78464, 103289, 194265, 299752, 475086, 846933, 1216749, 2261920, 3320935, 5795349, 9292376, 14825858, 25570823, 39030115, 68265801, 106030947, 178696496
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2022

Keywords

Examples

			The a(6) = 4 through a(9) = 15 compositions:
  (6)       (7)        (8)         (9)
  (33)      (124)      (44)        (333)
  (222)     (142)      (2222)      (1224)
  (111111)  (214)      (11111111)  (1242)
            (241)                  (1422)
            (412)                  (2124)
            (421)                  (2142)
            (1111111)              (2214)
                                   (2241)
                                   (2412)
                                   (2421)
                                   (4122)
                                   (4212)
                                   (4221)
                                   (111111111)
		

Crossrefs

The unordered version (partitions) is A067539, ranked by A326623.
Compositions with integer average are A271654, partitions A067538.
Subsets whose geometric mean is an integer are A326027.
The version for factorizations is A326028.
The strict case is A339452, partitions A326625.
These compositions are ranked by A357490.
A011782 counts compositions.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],IntegerQ[GeometricMean[#]]&]],{n,0,15}]
  • Python
    from math import prod, factorial
    from sympy import integer_nthroot
    from sympy.utilities.iterables import partitions
    def A357710(n): return sum(factorial(s)//prod(factorial(d) for d in p.values()) for s,p in partitions(n,size=True) if integer_nthroot(prod(a**b for a, b in p.items()),s)[1]) if n else 0 # Chai Wah Wu, Sep 24 2023

Extensions

More terms from David A. Corneth, Oct 17 2022

A070007 Arithmetic mean of distinct primes dividing n is a square number.

Original entry on oeis.org

15, 42, 45, 65, 75, 77, 84, 87, 126, 135, 141, 168, 225, 247, 252, 258, 261, 285, 294, 301, 325, 335, 336, 357, 375, 378, 405, 410, 423, 429, 481, 504, 516, 539, 588, 589, 591, 618, 671, 672, 675, 717, 756, 767, 774, 783, 785, 820, 845, 847, 855, 882, 986
Offset: 1

Views

Author

Labos Elemer, Apr 11 2002

Keywords

Comments

Subset of A078174. [R. J. Mathar, Sep 20 2008]

Examples

			n=1972=2*17*29: mean=(2+17+29)/3=48/3=16, a square.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 1000], IntegerQ@ Sqrt[Total[First /@ FactorInteger@ #]/PrimeNu@ #] &] (* Michael De Vlieger, Mar 28 2015 *)
  • PARI
    lista(nn) = {for (n=2, nn, f = factor(n); if ((#f~ != 1) && (type(q=sum(k=1, #f~, f[k,1])/#f~) == "t_INT") && issquare(q), print1(n, ", ")););} \\ Michel Marcus, Mar 28 2015

A174894 Numbers such that the arithmetic mean of their distinct prime factors and the arithmetic mean of all of their prime factors are both integers.

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, 47, 49, 51, 53, 55, 57, 59, 61, 64, 65, 67, 69, 71, 73, 77, 78, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 101
Offset: 1

Views

Author

Jaroslav Krizek, Apr 01 2010

Keywords

Comments

Subsequence of A078174 and A078175.
Complement of A176552. [From Jaroslav Krizek, Apr 21 2010]

Examples

			For a(11) = 16: 16 = 2^4; both (2+2+2+2)/4 and 2/1 are integers.
		

Programs

  • Mathematica
    mdmaQ[n_]:=With[{fi=FactorInteger[n]},AllTrue[{Mean[Flatten[Table[#[[1]],#[[2]]]&/@fi]],Mean[fi[[;;,1]]]},IntegerQ]]; Select[Range[ 2,110],mdmaQ] (* Harvey P. Dale, Nov 16 2024 *)

Extensions

Definition clarified by Harvey P. Dale, Nov 16 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)).

A285510 Numbers k such that the average of the squarefree divisors of k is an integer.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 67, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 20 2017

Keywords

Comments

Numbers n such that A034444(n)|A048250(n).
Numbers n such that 2^omega(n)|psi(rad(n)), where omega() is the number of distinct prime divisors (A001221), psi() is the Dedekind psi function (A001615) and rad() is the squarefree kernel (A007947).
From Robert Israel, Apr 24 2017: (Start)
All odd numbers are in the sequence.
A positive even number is in the sequence if and only if at least one of its prime factors is in A002145.
Thus this is the complement of 2*A072437 in the positive numbers.
(End)

Examples

			44 is in the sequence because 44 has 6 divisors {1, 2, 4, 11, 22, 44} among which 4 are squarefree {1, 2, 11, 22} and (1 + 2 + 11 + 22)/4 = 9 is an integer.
		

Crossrefs

Programs

  • Maple
    filter:= n -> n::odd or has(numtheory:-factorset(n) mod 4, 3):
    select(filter, [$1..1000]); # Robert Israel, Apr 24 2017
  • Mathematica
    Select[Range[100], IntegerQ[Total[Select[Divisors[#], SquareFreeQ]] / 2^PrimeNu[#]] &]
    Select[Range[110],IntegerQ[Mean[Select[Divisors[#],SquareFreeQ]]]&] (* Harvey P. Dale, Apr 11 2018 *)
    Select[Range[100], IntegerQ[Times @@ ((1 + FactorInteger[#][[;; , 1]])/2)] &] (* Amiram Eldar, Jul 01 2022 *)

Formula

a(n) ~ n (conjecture).
Conjecture is true, since A072437 has density 0. - Robert Israel, Apr 24 2017

A339452 Number of compositions (ordered partitions) of n into distinct parts such that the geometric mean of the parts is an integer.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 7, 1, 1, 5, 1, 1, 9, 7, 3, 1, 3, 1, 7, 11, 13, 1, 7, 1, 11, 35, 25, 31, 27, 5, 157, 1, 31, 131, 39, 31, 33, 37, 183, 179, 135, 157, 7, 265, 3, 871, 187, 865, 259, 879, 867, 179, 1593, 6073, 1593, 271, 5995, 149, 6661, 2411, 1509, 997, 1045, 5887
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 05 2020

Keywords

Examples

			a(10) = 5 because we have [10], [9, 1], [1, 9], [8, 2] and [2, 8].
		

Crossrefs

For partitions we have A326625, non-strict A067539 (ranked by A326623).
The version for subsets is A326027.
For arithmetic mean we have A339175, non-strict A271654.
The non-strict case is counted by A357710, ranked by A357490.
A032020 counts strict compositions.
A067538 counts partitions with integer average.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@#&&IntegerQ[GeometricMean[#]]&]],{n,0,15}] (* Gus Wiseman, Oct 30 2022 *)

A303482 Numbers k such that the average of all distinct prime factors of all positive integers <= k is an integer.

Original entry on oeis.org

2, 5, 81, 10742, 10130527, 1041972864, 23292549600
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 24 2018

Keywords

Comments

Numbers k such that A013939(k)|A024924(k).

Examples

			5 is in the sequence because the distinct prime factors of 2, 3, 4, and 5 are 2, 3, 2 and 5 respectively and their average (2 + 3 + 2 + 5) / 4 = 3 is an integer. - _David A. Corneth_, Apr 26 2018
		

Crossrefs

Programs

  • Mathematica
    s = t = 0; k = 2; lst = {}; While[k < 1000000000, p = #[[1]] & /@ FactorInteger@ k; s = s + Plus @@ p; t = t + Length@ p; If[ Mod[s, t] == 0, AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Apr 26 2018 *)

Extensions

a(5) from Daniel Suteu, Apr 24 2018
a(6)-a(7) from Giovanni Resta, Apr 26 2018

A357490 Numbers k such that the k-th composition in standard order has integer geometric mean.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 15, 16, 17, 24, 31, 32, 36, 42, 63, 64, 69, 70, 81, 88, 98, 104, 127, 128, 136, 170, 255, 256, 277, 278, 282, 292, 325, 326, 337, 344, 354, 360, 394, 418, 424, 511, 512, 513, 514, 515, 528, 547, 561, 568, 640, 682, 768, 769, 785, 792, 896
Offset: 1

Views

Author

Gus Wiseman, Oct 16 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their corresponding compositions begin:
   1: (1)
   2: (2)
   3: (1,1)
   4: (3)
   7: (1,1,1)
   8: (4)
  10: (2,2)
  15: (1,1,1,1)
  16: (5)
  17: (4,1)
  24: (1,4)
  31: (1,1,1,1,1)
  32: (6)
  36: (3,3)
  42: (2,2,2)
  63: (1,1,1,1,1,1)
  64: (7)
  69: (4,2,1)
		

Crossrefs

For regular mean we have A096199, counted by A271654 (partitions A067538).
Subsets whose geometric mean is an integer are counted by A326027.
The unordered version (partitions) is A326623, counted by A067539.
The strict case is counted by A339452, partitions A326625.
These compositions are counted by A357710.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,1000],IntegerQ[GeometricMean[stc[#]]]&]
Previous Showing 21-30 of 34 results. Next