# [seqfan] More on Smarandache function.

Christian G.Bower bowerc at usa.net
Wed May 13 04:40:35 CEST 1998

```Since S(n!)=n and if k>n! S(k)>n, S(k)=n for only finitely many k.

If S(k)=2 then k=2
If S(k)=3 then k=3 or 6
If S(k)=4 then k=4, 8, 12 or 24
...

The number of k (as well as the values) can be easily calculated by
examining the prime factorizations.

Consider 30:

30=2*3*5
29!=2^25*3^13*5^6*7^4*11^2*13^2*17*19*23*29

If S(k)=30 then k|30! but k does not divide 29!

So the powers of the primes in the p.f. of k are at most those
of 30!=29!*30.

At least one must be greater than those of 29!

Thus 2^26|k or 3^14|k or 5^7|k.
Any pair or all three is allowed as well giving 7 possibilities.

This does not count the other primes in 29!. Any subset of those
can be included.

For example, 7^4|29! so the power of 7 in k can be any value from
0 to 4 (5 choices.)

For total number of choices, add one to each power in the p.f. of 30
and subtract one from the product (any nonempty subset) so
we get (1+1)*(1+1)*(1+1)-1=7.
(from 2^1*3^1*5^1)

Then add one to each power in the p.f. of 29! for a prime not in the
p.f. of 30.

For 29! we take the powers of 7, 11, 13, 17, 19, 23 and 29 but not
2, 3, and 5 as those primes are in the p.f. of 30.

So we get (4+1)*(2+1)*(2+1)*(1+1)*(1+1)*(1+1)*(1+1)=720

Mulitiply by the 7 we got from the factors of 30 and get 5040,
the number of k such that S(k)=30.

(Just submitted as A038024 1,1,2,4,8,6,30...)

Christian

____________________________________________________________________