login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A248410 a(n) = number of polynomials a_k*x^k + ... + a_1*x + n with k > 0, integer coefficients and only distinct integer roots. 3

%I #25 Nov 16 2014 14:42:52

%S 3,11,11,23,11,43,11,47,23,43,11,103,11,43,43,83,11,103,11,103,43,43,

%T 11,223,23,43,47,103,11,187,11,139,43,43,43,275,11,43,43,223,11,187,

%U 11,103,103,43,11,427,23,103,43,103,11,223,43,223,43,43,11,503,11,43,103,227,43,187,11,103,43,187,11,635,11,43,103,103,43,187,11

%N a(n) = number of polynomials a_k*x^k + ... + a_1*x + n with k > 0, integer coefficients and only distinct integer roots.

%C If D_n is the set of all positive and negative divisors of n, then a(n) is the number of all subsets of D_n for which the product of all their elements is a divisor of n. a(n) depends only on the prime signature of n.

%H Reiner Moewald, <a href="/A248410/b248410.txt">Table of n, a(n) for n = 1..502</a>

%e a(1)=3: x + 1; -x + 1; -x^2 + 1.

%o (Python)

%o from itertools import chain, combinations

%o def powerset(iterable):

%o ...s = list(iterable)

%o ...return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))

%o print("Start")

%o a_n = 0

%o for num in range(1,1000):

%o ...div_set = set((-1,1))

%o ...a_n = 0

%o ...for divisor in range(1, num + 1):

%o ......if (num % divisor == 0):

%o .........div_set.add(divisor)

%o .........div_set.add(divisor*(-1))

%o ...pow_set = set(powerset(div_set))

%o ...num_set = len(pow_set)

%o ...for count_set in range(0, num_set):

%o ......subset = set(pow_set.pop())

%o ......num_subset = len(subset)

%o ......prod = 1

%o ......if num_subset < 1:

%o .........prod = 0

%o ......for count_subset in range (0, num_subset):

%o .........prod = prod * subset.pop()

%o ......if prod != 0:

%o .........if (num % prod == 0):

%o ............a_n = a_n +1

%o ...print(num, a_n)

%o print("Ende")

%Y Cf. A248348, A248955.

%K nonn

%O 1,1

%A _Reiner Moewald_, Oct 06 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)