OFFSET
1,2
COMMENTS
Digit-sum of A060283(n).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
Prime(6) = 13, 1/13 = 0.076923076923076923076923..., the periodic part of which is 076923, whose digits add to 27 = a(6).
Since prime(n) must either divide or be coprime to 10, decimal expansions of prime(n) must either terminate or be purely recurrent, respectively. The only primes that divide 10 are prime(1) and prime(3), thus a(1) and a(3) = 0 as they have terminating decimal expansions. - Michael De Vlieger, May 20 2017
MATHEMATICA
Table[Function[p, If[Divisible[10, p], 0, Total[RealDigits[1/p][[1, 1]]]]]@ Prime@ n, {n, 66}] (* Michael De Vlieger, May 20 2017 *)
PROG
(PARI) forprime(i=1, 1e2, print1(sumdigits((10^iferr(znorder(Mod(10, i)), E, 0)-1)/i)", ")) \\ Lear Young, Mar 01 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Kozhukhov Vlad, Dec 04 2013
EXTENSIONS
Edited by David Applegate, Mar 01 2014
STATUS
approved