cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238104 Sum of digits in periodic part of decimal expansion of 1/prime(n).

This page as a plain text file.
%I A238104 #36 May 22 2017 03:36:30
%S A238104 0,3,0,27,9,27,72,81,99,126,54,9,18,90,207,63,261,270,144,126,36,54,
%T A238104 171,198,432,18,153,225,486,504,189,585,36,207,666,306,351,360,747,
%U A238104 207,801,810,369,864,441,405,135,999,486,1026,1044,18,135,225,1152,1179,1206,18,324,126,621,657,675,612,1404,351
%N A238104 Sum of digits in periodic part of decimal expansion of 1/prime(n).
%C A238104 Digit-sum of A060283(n).
%H A238104 Michael De Vlieger, <a href="/A238104/b238104.txt">Table of n, a(n) for n = 1..10000</a>
%F A238104 a(n) = A007953(A060283(n)). - _Michel Marcus_, Mar 02 2014
%e A238104 Prime(6) = 13, 1/13 = 0.076923076923076923076923..., the periodic part of which is 076923, whose digits add to 27 = a(6).
%e A238104 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
%t A238104 Table[Function[p, If[Divisible[10, p], 0, Total[RealDigits[1/p][[1, 1]]]]]@ Prime@ n, {n, 66}] (* _Michael De Vlieger_, May 20 2017 *)
%o A238104 (PARI) forprime(i=1,1e2,print1(sumdigits((10^iferr(znorder(Mod(10,i)),E,0)-1)/i)", ")) \\ _Lear Young_, Mar 01 2014
%Y A238104 Cf. A060283, A002371, A238105, A238106.
%K A238104 nonn,base
%O A238104 1,2
%A A238104 _Kozhukhov Vlad_, Dec 04 2013
%E A238104 Edited by _David Applegate_, Mar 01 2014