← RoseCode

ROSECODE 565

Tetration

C_K_Yang · Math ·

The tetration of a number a by a positive integer b, denoted by a↑↑b or ba, is recursively defined by:

a↑↑1=a
a↑↑(k+1)=aa↑↑k

Thus we have e.g. 2↑↑2=4 and 3↑↑3=7625597484987.

Let Pn,i be the i-th prime number among all prime numbers >n such that P10,1=11, P30,2=37 and P100,3=107.

Let MOD(n,m)=n modulo m.

Further define f(k)=i=1kMOD(i↑↑i,Pk,i).

For example f(3)=MOD(1↑↑1,5)+MOD(2↑↑2,7)+MOD(3↑↑3,11)=14.

You are given f(100)=20245.

Find f(106).