A363981 Integers k such that the smallest integer with k factor pairs has an odd number of divisors.
1, 2, 5, 11, 13, 14, 17, 23, 29, 38, 41, 43, 46, 47, 53, 58, 59, 61, 67, 68, 71, 73, 74, 83, 86, 89, 94, 95, 101, 103, 107, 109, 111, 113, 116, 118, 122, 123, 127, 131, 137, 138, 143, 149, 151, 158, 163, 167, 172, 173, 178, 179, 181, 188, 191, 193, 194, 197
Offset: 1
Keywords
Examples
The smallest number with 5 factor pairs is 36: (1,36), (2,18), (3,12), (4,9), (6,6). 36 has an odd number of divisors, 9. Thus, 5 is a term.
Programs
-
PARI
f(n) = min(A005179(2*n-1), A005179(2*n)); \\ A038549 isok(k) = issquare(f(k)); \\ Michel Marcus, Jul 07 2023
-
Python
from sympy.utilities.iterables import multiset_partitions from sympy.ntheory import factorint, prime import math def smallestNumWithNDivisors(n): partitionsOfPrimeFactors = multiset_partitions(factorint(n, multiple=True)) candidates = [] for partition in partitionsOfPrimeFactors: factorization = [] for subset in partition: factorization.append(math.prod(subset)) factorization.sort() factorization.reverse() candidate = 1 for j in range(0, len(factorization)): candidate *= prime(j+1)**(factorization[j]-1) candidates.append(candidate) return min(candidates) for k in range(1,200): if smallestNumWithNDivisors(2*k-1)
Comments