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 31-40 of 46 results. Next

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

A200612 The arithmetic mean of the prime factors (with multiplicity) of n is 3.

Original entry on oeis.org

3, 9, 20, 27, 60, 81, 112, 180, 243, 336, 400, 540, 729, 1008, 1200, 1620, 2187, 2240, 2816, 3024, 3600, 4860, 6561, 6720, 8000, 8448, 9072, 10800, 12544, 13312, 14580, 19683, 20160, 24000, 25344, 27216, 32400, 37632, 39936, 43740, 44800, 56320, 59049, 60480
Offset: 1

Views

Author

Jeffrey Burch, Nov 19 2011

Keywords

Examples

			20 is in the sequence because 20 = 2*2*5 and (2+2+5)/3 = 9/3 = 3.
		

Crossrefs

Subsequence of A078175.

Programs

  • Haskell
    a200612 n = a200612_list !! (n-1)
    a200612_list = filter f [2..] where
       f x = r == 0 && x' == 3 where (x',r) = divMod (a001414 x) (a001222 x)
    -- Reinhard Zumkeller, Nov 20 2011
    
  • Maple
    for i from 2 to 35000 do: a:=ifactors(i): s:=sum((a[2][j][1]*a[2][j][2]),j=1..nops(a[2])): t:=sum((a[2][j][2]),j=1..nops(a[2])): if s/t=3 then print(i); fi od:
  • Mathematica
    Select[Range[61000],Mean[Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[ #]]]==3&] (* Harvey P. Dale, Nov 08 2013 *)
  • PARI
    isok(n) = my(f = factor(n)); (sum(k=1, #f~, f[k,1]*f[k,2]) / vecsum(f[,2])) == 3; \\ Michel Marcus, Feb 22 2016

Formula

A001414(a(n)) mod A001222(a(n)) = 0 and A001414(a(n))/A001222(a(n)) = 3. [Reinhard Zumkeller, Nov 20 2011]

A327900 Nonprime squarefree numbers whose prime indices all have the same Omega (number of prime factors counted with multiplicity).

Original entry on oeis.org

1, 15, 33, 51, 55, 85, 91, 93, 123, 155, 161, 165, 177, 187, 201, 203, 205, 249, 255, 295, 299, 301, 327, 329, 335, 341, 377, 381, 415, 451, 465, 471, 511, 527, 537, 545, 553, 559, 561, 573, 611, 615, 633, 635, 649, 667, 679, 697, 703, 707, 723, 737, 785, 831
Offset: 1

Views

Author

Gus Wiseman, Sep 30 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 sequence of terms together with their prime indices begins:
    1: {}
   15: {2,3}
   33: {2,5}
   51: {2,7}
   55: {3,5}
   85: {3,7}
   91: {4,6}
   93: {2,11}
  123: {2,13}
  155: {3,11}
  161: {4,9}
  165: {2,3,5}
  177: {2,17}
  187: {5,7}
  201: {2,19}
  203: {4,10}
  205: {3,13}
  249: {2,23}
  255: {2,3,7}
  295: {3,17}
		

Crossrefs

The case including primes and nonsquarefree numbers is A320324.
The version for sum of prime indices is A327901.
The version for mean of prime indices is A327902.

Programs

  • Mathematica
    Select[Range[1000],!PrimeQ[#]&&SquareFreeQ[#]&&SameQ@@PrimeOmega/@PrimePi/@First/@FactorInteger[#]&]

A327902 Nonprime squarefree numbers whose prime indices all have the same average of prime indices (A326567/A326568).

Original entry on oeis.org

1, 21, 57, 115, 133, 145, 159, 371, 393, 399, 515, 535, 565, 667, 803, 869, 917, 933, 1007, 1067, 1113, 1963, 2021, 2095, 2157, 2165, 2177, 2249, 2285, 2315, 2363, 2369, 2461, 2489, 2599, 2705, 2751, 2839, 2987, 3021, 3103, 3277, 3335, 3707, 3859, 4331, 4367
Offset: 1

Views

Author

Gus Wiseman, Sep 30 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 sequence of terms together with their prime indices begins:
     1: {}
    21: {2,4}
    57: {2,8}
   115: {3,9}
   133: {4,8}
   145: {3,10}
   159: {2,16}
   371: {4,16}
   393: {2,32}
   399: {2,4,8}
   515: {3,27}
   535: {3,28}
   565: {3,30}
   667: {9,10}
   803: {5,21}
   869: {5,22}
   917: {4,32}
   933: {2,64}
  1007: {8,16}
  1067: {5,25}
		

Crossrefs

The version including primes and nonsquarefree numbers is A326536.
The version for number of prime indices is A327900.
The version for sum of prime indices is A327901.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[1000],!PrimeQ[#]&&SquareFreeQ[#]&&SameQ@@Mean/@primeMS/@primeMS[#]&];

A327906 Numbers with only one factorization into factors > 1 with integer mean (namely, as a singleton).

Original entry on oeis.org

2, 3, 5, 6, 7, 10, 11, 13, 14, 17, 18, 19, 22, 23, 26, 29, 30, 31, 34, 37, 38, 41, 43, 46, 47, 53, 58, 59, 61, 62, 66, 67, 70, 71, 73, 74, 79, 82, 83, 86, 89, 90, 94, 97, 98, 101, 102, 103, 106, 107, 109, 113, 118, 122, 127, 130, 131, 134, 137, 138, 139, 142
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2019

Keywords

Examples

			There are 4 factorizations of 24 with integer mean, namely:
  (24)
  (4*6)
  (2*12)
  (2*3*4)
so 24 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],Length[Select[facs[#],IntegerQ[Mean[#]]&]]==1&]
  • PARI
    A326622(n, m=n, facsum=0, facnum=0) = if(1==n,facnum > 0 && 1==denominator(facsum/facnum), my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A326622(n/d, d, facsum+d, facnum+1))); (s)); \\ Antti Karttunen, Nov 10 2024
    isA327906(n) = (1==A326622(n)); \\ Antti Karttunen, Nov 10 2024

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

A327907 Numbers with more than one factorization into at factors > 1 with integer mean.

Original entry on oeis.org

4, 8, 9, 12, 15, 16, 20, 21, 24, 25, 27, 28, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 54, 55, 56, 57, 60, 63, 64, 65, 68, 69, 72, 75, 76, 77, 78, 80, 81, 84, 85, 87, 88, 91, 92, 93, 95, 96, 99, 100, 104, 105, 108, 110, 111, 112, 114, 115, 116
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2019

Keywords

Examples

			There are 6 factorizations of 60 with integer mean, namely:
  (60)
  (2*30)
  (6*10)
  (3*4*5)
  (2*3*10)
  (2*2*3*5)
so 60 is in the sequence.
		

Crossrefs

Complement of A327906.
Positions of terms > 1 in A326622.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Select[Range[100],Length[Select[facs[#],IntegerQ[Mean[#]]&]]>1&]

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[#]]]&]

A358331 Number of integer partitions of n with arithmetic and geometric mean differing by one.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 2, 0, 2, 0, 1, 1, 0, 3, 3, 0, 0, 2, 2, 0, 4, 0, 0, 5, 0, 0, 4, 5, 4, 3, 2, 0, 3, 3, 10, 4, 0, 0, 7, 0, 0, 16, 2, 4, 4, 0, 0, 5, 24, 0, 6, 0, 0, 9, 0, 27, 10, 0, 7, 7, 1, 0, 44
Offset: 0

Views

Author

Gus Wiseman, Nov 09 2022

Keywords

Comments

The arithmetic and geometric mean from such partition is a positive integer. - David A. Corneth, Nov 11 2022

Examples

			The a(30) = 2 through a(36) = 3 partitions (C = 12, G = 16):
  (888222)      .  (99333311)  (G2222222111)  .  (C9662)    (G884)
  (8844111111)                                   (C9833)    (888222111111)
                                                 (8884421)  (G42222221111)
		

Crossrefs

The version for subsets seems to be close to A178832.
These partitions are ranked by A358332.
A000041 counts partitions.
A067538 counts partitions with integer average, ranked by A316413.
A067539 counts partitions with integer geometric mean, ranked by A326623.
A078175 lists numbers whose prime factors have integer average.
A320322 counts partitions whose product is a perfect power.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Mean[#]==1+GeometricMean[#]&]],{n,0,30}]
  • PARI
    a(n) = if (n, my(nb=0,vp); forpart(p=n, vp=Vec(p); if (vecsum(vp)/#p == 1 + sqrtn(vecprod(vp), #p), nb++)); nb, 0); \\ Michel Marcus, Nov 11 2022
    
  • Python
    from math import prod
    from sympy import divisors, integer_nthroot
    from sympy.utilities.iterables import partitions
    def A358331(n):
        divs = {d:n//d-1 for d in divisors(n,generator=True)}
        return sum(1 for s,p in partitions(n,m=max(divs,default=0),size=True) if s in divs and (t:=integer_nthroot(prod(a**b for a, b in p.items()),s))[1] and divs[s]==t[0]) # Chai Wah Wu, Sep 24 2023

Extensions

a(61)-a(80) from Giorgos Kalogeropoulos, Nov 11 2022
a(81)-a(84) from Chai Wah Wu, Sep 24 2023
Previous Showing 31-40 of 46 results. Next