%I #18 Jul 19 2018 17:38:18
%S 0,0,11,40,112,312,71,4888,322,333710,9414,534888,10073,265371785,
%T 913990,2906544,5882692,5365294080,386339,1111111111111111111,41017,
%U 10845593,547805,11111111111111111111111,100000284,182521260315
%N Sum of primes dividing the repunit numbers (with repetition).
%H Giovanni Resta, <a href="/A064798/b064798.txt">Table of n, a(n) for n = 0..322</a> (first 101 terms from Harry J. Smith)
%t a[n_] := If[n < 2, 0, Total[Times @@@ FactorInteger[Floor[10^n/9]]]]; Array[a, 30, 0] (* _Giovanni Resta_, Jul 19 2018 *)
%o (PARI) a(n) = (10^n-1)/9; {sopfr(n, s, fac, i) = fac=factor(n); for(i=1,matsize(fac)[1],s=s+fac[i,1]*fac[i,2]); return(s); } for(n=0,35,print1(sopfr(a(n)),","))
%o (PARI) sopfr(n)= { local(f,s=0); f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]*f[i, 2]); return(s) } { for (n=0, 100, write("b064798.txt", n, " ", sopfr((10^n - 1)/9)) ) } \\ _Harry J. Smith_, Sep 26 2009
%Y Cf. A002275, A001414.
%K nonn,base
%O 0,3
%A _Jason Earls_, Oct 18 2001
|