[go: up one dir, main page]

login
Search: a347042 -id:a347042
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of divisors of n with exactly half as many prime factors as n, counting multiplicity.
+10
22
1, 0, 0, 1, 0, 2, 0, 0, 1, 2, 0, 0, 0, 2, 2, 1, 0, 0, 0, 0, 2, 2, 0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 2, 2, 2, 2, 0, 4, 0, 2, 0, 1, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 2, 0, 4, 2, 2, 2
OFFSET
1,6
COMMENTS
These divisors do not necessarily include the central divisors (A207375), and may not themselves be central.
EXAMPLE
The a(n) divisors for selected n:
n = 1: 6: 36: 60: 210: 840: 900: 1260: 1296: 3600:
--------------------------------------------------------
1 2 4 4 6 8 12 12 16 16
3 6 6 10 12 18 18 24 24
9 10 14 20 20 20 36 36
15 15 28 30 28 54 40
21 30 45 30 81 60
35 42 50 42 90
70 75 45 100
105 63 150
70 225
105
MATHEMATICA
Table[Length[Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&]], {n, 100}]
PROG
(PARI) a(n) = my(nb=bigomega(n)); sumdiv(n, d, 2*bigomega(d) == nb); \\ Michel Marcus, Aug 16 2021
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
divs = divisors(n)
return sum(2*len(factorint(d, multiple=True)) == npf for d in divs)
print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Aug 17 2021
(Python 3.8+)
from itertools import combinations
from math import prod, comb
from sympy import factorint
def A345957(n):
if n == 1:
return 1
fs = factorint(n)
elist = list(fs.values())
q, r = divmod(sum(elist), 2)
k = len(elist)
if r:
return 0
c = 0
for i in range(k+1):
m = (-1)**i
for d in combinations(range(k), i):
t = k+q-sum(elist[j] for j in d)-i-1
if t >= 0:
c += m*comb(t, k-1)
return c # Chai Wah Wu, Aug 20 2021
(Python)
from sympy import factorint
from sympy.utilities.iterables import multiset_combinations
def A345957(n):
if n == 1:
return 1
fs = factorint(n, multiple=True)
q, r = divmod(len(fs), 2)
return 0 if r else len(list(multiset_combinations(fs, q))) # Chai Wah Wu, Aug 20 2021
CROSSREFS
The case of powers of 2 is A000035.
Positions of even terms are A000037.
Positions of odd terms are A000290.
Positions of 0's are A026424.
Positions of 1's are A056798.
The rounded version is A096825.
The case of all divisors (not just 2) is A347042.
The smallest of these divisors is A347045 (rounded: A347043).
The greatest of these divisors is A347046 (rounded: A347044).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A334997 counts chains of divisors of n by length.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2021
STATUS
approved
Greatest divisor of n with half (rounded up) as many prime factors (counting multiplicity) as n.
+10
22
1, 2, 3, 2, 5, 3, 7, 4, 3, 5, 11, 6, 13, 7, 5, 4, 17, 9, 19, 10, 7, 11, 23, 6, 5, 13, 9, 14, 29, 15, 31, 8, 11, 17, 7, 9, 37, 19, 13, 10, 41, 21, 43, 22, 15, 23, 47, 12, 7, 25, 17, 26, 53, 9, 11, 14, 19, 29, 59, 15, 61, 31, 21, 8, 13, 33, 67, 34, 23, 35, 71
OFFSET
1,2
COMMENTS
Appears to contain each positive integer at least once, but only a finite number of times.
LINKS
FORMULA
a(n) = Product_{k=floor(A001222(n)/2)+1..A001222(n)} A027746(n,k). - Amiram Eldar, Nov 02 2024
EXAMPLE
The divisors of 123456 with half bigomega are: 16, 24, 5144, 7716, so a(123456) = 7716.
MATHEMATICA
Table[Max[Select[Divisors[n], PrimeOmega[#]==Ceiling[PrimeOmega[n]/2]&]], {n, 100}]
a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; Times @@ p[[Floor[np/2] + 1;; np]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
PROG
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
for d in divisors(n)[::-1]:
if len(factorint(d, multiple=True)) == (npf+1)//2: return d
return 1
print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Aug 18 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A347044(n):
fs = factorint(n, multiple=True)
l = len(fs)
return prod(fs[l//2:]) # Chai Wah Wu, Aug 20 2021
CROSSREFS
The greatest divisor without the condition is A006530 (smallest: A020639).
Divisors of this type are counted by A096825 (exact: A345957).
The case of powers of 2 is A163403.
The smallest divisor of this type is given by A347043 (exact: A347045).
The exact version is A347046.
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A038548 counts inferior (or superior) divisors (strict: A056924).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2021
STATUS
approved
Smallest divisor of n with half (rounded up) as many prime factors (counting multiplicity) as n.
+10
21
1, 2, 3, 2, 5, 2, 7, 4, 3, 2, 11, 4, 13, 2, 3, 4, 17, 6, 19, 4, 3, 2, 23, 4, 5, 2, 9, 4, 29, 6, 31, 8, 3, 2, 5, 4, 37, 2, 3, 4, 41, 6, 43, 4, 9, 2, 47, 8, 7, 10, 3, 4, 53, 6, 5, 4, 3, 2, 59, 4, 61, 2, 9, 8, 5, 6, 67, 4, 3, 10, 71, 8, 73, 2, 15, 4, 7, 6, 79, 8
OFFSET
1,2
COMMENTS
Appears to contain every positive integer at least once.
This is correct. For any integer m, let p be any prime > m. Then a(m*p^A001222(m)) = m. - Sebastian Karlsson, Oct 11 2022
LINKS
FORMULA
a(n) = Product_{k=1..ceiling(A001222(n)/2)} A027746(n,k). - Amiram Eldar, Nov 02 2024
EXAMPLE
The divisors of 123456 with half bigomega are: 16, 24, 5144, 7716, so a(123456) = 16.
MATHEMATICA
Table[Min[Select[Divisors[n], PrimeOmega[#]==Ceiling[PrimeOmega[n]/2]&]], {n, 100}]
a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]}, Times @@ p[[1 ;; Ceiling[Length[p]/2]]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
PROG
(PARI) a(n) = my(bn=ceil(bigomega(n)/2)); fordiv(n, d, if (bigomega(d)==bn, return (d))); \\ Michel Marcus, Aug 18 2021
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
for d in divisors(n):
if len(factorint(d, multiple=True)) == (npf+1)//2: return d
return 1
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Aug 18 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A347043(n):
fs = factorint(n, multiple=True)
l = len(fs)
return prod(fs[:(l+1)//2]) # Chai Wah Wu, Aug 20 2021
CROSSREFS
Positions of 2's are A001747.
Positions of odd terms are A005408.
Positions of even terms are A005843.
The case of powers of 2 is A016116.
The smallest divisor without the condition is A020639 (greatest: A006530).
These divisors are counted by A096825 (exact: A345957).
The greatest of these divisors is A347044 (exact: A347046).
The exact version is A347045.
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 15 2021
STATUS
approved
Smallest divisor of n with exactly half as many prime factors (counting multiplicity) as n, or 1 if there are none.
+10
8
1, 1, 1, 2, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 3, 4, 1, 1, 1, 1, 3, 2, 1, 4, 5, 2, 1, 1, 1, 1, 1, 1, 3, 2, 5, 4, 1, 2, 3, 4, 1, 1, 1, 1, 1, 2, 1, 1, 7, 1, 3, 1, 1, 6, 5, 4, 3, 2, 1, 4, 1, 2, 1, 8, 5, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 7, 1, 1, 1, 9, 2, 1, 4, 5, 2, 3
OFFSET
1,4
LINKS
FORMULA
a(n) = Product_{k=1..A001222(n)/2} A027746(n,k) if A001222(n) is even, and 1 otherwise. - Amiram Eldar, Nov 02 2024
EXAMPLE
The divisors of 90 with half bigomega are: 6, 9, 10, 15, so a(90) = 6.
MATHEMATICA
Table[If[#=={}, 1, Min[#]]&@Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&], {n, 100}]
a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; If[OddQ[np], 1, Times @@ p[[1 ;; np/2]]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
PROG
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
for d in divisors(n)[1:-1]:
if 2*len(factorint(d, multiple=True)) == npf: return d
return 1
print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Aug 18 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A347045(n):
fs = factorint(n, multiple=True)
q, r = divmod(len(fs), 2)
return 1 if r else prod(fs[:q]) # Chai Wah Wu, Aug 20 2021
CROSSREFS
The smallest divisor without the condition is A020639 (greatest: A006530).
Positions of 1's are A026424.
Positions of even terms are A063745 = 2*A026424.
The case of powers of 2 is A072345.
Positions of 2's are A100484.
Divisors of this type are counted by A345957 (rounded: A096825).
The rounded version is A347043.
The greatest divisor of this type is A347046 (rounded: A347044).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2021
STATUS
approved
Greatest divisor of n with exactly half as many prime factors (counting multiplicity) as n, or 1 if there are none.
+10
8
1, 1, 1, 2, 1, 3, 1, 1, 3, 5, 1, 1, 1, 7, 5, 4, 1, 1, 1, 1, 7, 11, 1, 6, 5, 13, 1, 1, 1, 1, 1, 1, 11, 17, 7, 9, 1, 19, 13, 10, 1, 1, 1, 1, 1, 23, 1, 1, 7, 1, 17, 1, 1, 9, 11, 14, 19, 29, 1, 15, 1, 31, 1, 8, 13, 1, 1, 1, 23, 1, 1, 1, 1, 37, 1, 1, 11, 1, 1, 1, 9
OFFSET
1,4
COMMENTS
Problem: What are the positions of last appearances > 1?
LINKS
FORMULA
a(n) = Product_{k=A001222(n)/2+1..A001222(n)} A027746(n,k) if A001222(n) is even, and 1 otherwise. - Amiram Eldar, Nov 02 2024
EXAMPLE
The divisors of 90 with half bigomega are: 6, 9, 10, 15, so a(90) = 15.
MATHEMATICA
Table[If[#=={}, 1, Max[#]]&@Select[Divisors[n], PrimeOmega[#]==PrimeOmega[n]/2&], {n, 100}]
a[n_] := Module[{p = Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]], np}, np = Length[p]; If[OddQ[np], 1, Times @@ p[[np/2+1 ;; np]]]]; Array[a, 100] (* Amiram Eldar, Nov 02 2024 *)
PROG
(Python)
from sympy import divisors, factorint
def a(n):
npf = len(factorint(n, multiple=True))
for d in divisors(n)[-1:0:-1]:
if 2*len(factorint(d, multiple=True)) == npf: return d
return 1
print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Aug 18 2021
(Python 3.8+)
from math import prod
from sympy import factorint
def A347046(n):
fs = factorint(n, multiple=True)
q, r = divmod(len(fs), 2)
return 1 if r else prod(fs[q:]) # Chai Wah Wu, Aug 20 2021
CROSSREFS
The greatest divisor without the condition is A006530 (smallest: A020639).
Positions of 1's are A026424.
The case of powers of 2 is A072345.
Positions of first appearances are A123667 (sorted: A123666).
Divisors of this type are counted by A345957 (rounded: A096825).
The rounded version is A347044.
The smallest divisor of this is A347045 (rounded: A347043).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors (also called bigomega).
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors (min: A033676, max: A033677).
A340387 lists numbers whose sum of prime indices is twice bigomega.
A340609 lists numbers whose maximum prime index divides bigomega.
A340610 lists numbers whose maximum prime index is divisible by bigomega.
A347042 counts divisors d|n such that bigomega(d) divides bigomega(n).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Aug 16 2021
STATUS
approved

Search completed in 0.008 seconds