OFFSET
0,2
COMMENTS
The sum of the distinct prime factors less than k for all 1 <= k <= 10^n, as tabulated for the individual k in A105221.
FORMULA
a(n) = Sum_{k=1..10^n} A105221(k). - R. J. Mathar, Dec 12 2007
a(n) = Sum_{prime p<10^n} p*floor((10^n-p)/p) = A006880(n)*10^n - A024934(10^n) - A046731(n). - Max Alekseyev, Jan 30 2012
EXAMPLE
a(1)=19 because 10^1=10 and the factors to be summed are 2 for 4, added to 2 and 3 for 6, added to 2 for 8, added to 3 for 9, added to 2 and 5 for 10.
MAPLE
A105221 := proc(n) local a, pfs, i ; a :=0 ; pfs := ifactors(n)[2] ; for i in pfs do if op(1, i) <> 1 and op(1, i) <> n then a := a+op(1, i) ; fi ; od: RETURN(a) ; end: A136021 := proc(n) add(A105221(i), i=2..10^n) ; end: for n from 1 do print(n, A136021(n)) ; od: # R. J. Mathar, Dec 12 2007
MATHEMATICA
f[n_] := Plus @@ (First@# & /@ FactorInteger@ n); k = 2; s = 0; lst = {}; Do[While[k < 10^n + 1, If[ ! PrimeQ@k, s = s + f@k]; k++ ]; AppendTo[ lst, s]; Print[{n, s}], {n, 8}] (* Robert G. Wilson v, Aug 06 2010 *)
PROG
(UBASIC) 10 'distinct prime factors of composites <=10^n 20 S=0:N=N+1:Z=N\2 30 'print N; 40 for F=1 to Z:Q=N/F: if Q<>int(Q) then 60 50 S=S+F: if F=prmdiv(F) and F>1 then C=C+1:G=G+F 60 next F 70 'print C, G 80 if N=10^1 or N=10^2 or N=10^3 or N=10^4 or N=10^5 or N=10^6 or N=10^7 then print G:stop 90 C=0 100 goto 20
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Enoch Haga, Dec 10 2007
EXTENSIONS
One more term from R. J. Mathar, Dec 12 2007
Edited by R. J. Mathar, Apr 17 2009
a(7) & a(8) from Robert G. Wilson v, Aug 06 2010
a(9)-a(11) from Max Alekseyev, Jan 30 2012
a(12)-a(14) from Hiroaki Yamanouchi, Jun 29 2014
STATUS
approved