Sigma, Sigh

Consider the following sequence 2 × 3 , 2 × 3 × 5 , 2 × 3 × 5 × 7 , . . . 2\times3 , 2\times3\times5 , 2\times3\times5\times7 , ... .

In general let us define ω ( n ) \omega(n) as ω ( n ) = i = 1 n p i \large{\omega(n) = \prod_{i=1}^{n} p_i} where p i p_i is the i i th prime number. How many digits are there in σ 2 ( ω ( 1000 ) ) \large{ \sigma_2( \omega( 1000 ) ) }

Details and assumptions

  • σ 2 ( n ) \sigma_2(n) is the divisor function of the second order. It returns the sum of the square of the divisors of n n .

  • For example σ 2 ( 10 ) = 1 2 + 2 2 + 5 2 + 1 0 2 = 130 \sigma_2(10) = 1^2 + 2^2 + 5^2 + 10^2 = 130

  • As an explicit example σ 2 ( ω ( 5 ) ) = 7930000 \sigma_2(\omega(5)) =7930000 .


The answer is 6786.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Beakal Tiliksew
Aug 13, 2015

Since p p prime σ 2 ( p ) = p 2 + 1 \sigma_{2}(p)=p^{2}+1 Also using the property σ ( a 1 × a 2 × a n ) = σ ( a 1 ) × σ ( a 2 ) × σ ( a n ) \sigma(a_{1}\times a_{2} \cdots\times a_{n})=\sigma(a_{1})\times \sigma(a_{2} )\cdots \times\sigma(a_{n})

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from functools import reduce
from operator import mul
numprimes = 1000
count = 0
n = 2
def product(iterable):
    return reduce(mul, iterable, 1)

def isprime(num):
    if num == 2:return True

    elif num < 2 or not num % 2: return False

    for i in range(3, int(num ** .5 + 1), 2):
        if not num % i: return False
    return True
L=[]
while count < int(numprimes):
    if isprime(n):
        L.append(n)
        count += 1
    n += 1

for i in range(len(L)):
    L[i] =((L[i]**2)+1)
print (len(str(product(L))))

Abhishek Sinha
Aug 22, 2015

Notice that σ 2 ( ω ( n ) ) = i = 1 n ( 1 + p i 2 ) \sigma_2(\omega(n))=\prod_{i=1}^{n}(1+p_i^2) Hence, log 10 ( σ 2 ( ω ( n ) ) ) = i = 1 n log 10 ( 1 + p i 2 ) \log_{10}(\sigma_2(\omega(n)))=\sum_{i=1}^{n} \log_{10}(1+p_i^2) Which can be readily computed from a list of first 1000 primes . The required answer is the ceiling of this sum.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...