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.

A067458 Sum of remainders when n is divided by its nonzero digits.

This page as a plain text file.
%I A067458 #6 Sep 24 2015 17:10:33
%S A067458 0,0,0,1,2,0,4,3,2,1,0,1,0,3,0,1,2,7,4,3,0,1,2,0,3,2,0,3,8,3,0,1,2,4,
%T A067458 0,1,6,8,0,5,0,1,2,5,6,0,3,3,5,9,0,1,2,3,4,5,0,5,6,9,0,1,2,4,6,5,10,0,
%U A067458 7,9,0,1,2,5,4,5,8,10,0,9,0,1,2,3,6,5,6,13,10,0,0
%N A067458 Sum of remainders when n is divided by its nonzero digits.
%C A067458 a(n) = 0 for 0 < n 10.
%C A067458 a(A002796(n)) = 0; a(A171492(n)) > 0. - _Reinhard Zumkeller_, Sep 24 2015
%H A067458 Reinhard Zumkeller, <a href="/A067458/b067458.txt">Table of n, a(n) for n = 10..10000</a>
%e A067458 a(14)= 2 as 1 divides 14 and 2 is the remainder obtained when 14 is divided by 4.
%t A067458 Table[Plus @@ Mod[n, Select[IntegerDigits[n], # != 0 &]], {n, 10, 100}]
%o A067458 (Haskell)
%o A067458 a067458 n = f 0 n where
%o A067458    f y 0 = y
%o A067458    f y x = if d == 0 then f y x' else f (y + mod n d) x'
%o A067458            where (x', d) = divMod x 10
%o A067458 -- _Reinhard Zumkeller_, Sep 24 2015
%Y A067458  Cf. A002796, A171492.
%K A067458 base,easy,nonn
%O A067458 10,5
%A A067458 _Amarnath Murthy_, Feb 07 2002
%E A067458 Edited and extended by _Robert G. Wilson v_, Feb 11 2002