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.

A226134 The partial digital sums of n from left to right mod 10 give the digits of a(n).

This page as a plain text file.
%I A226134 #18 May 16 2020 01:09:50
%S A226134 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,10,22,23,24,25,26,27,
%T A226134 28,29,20,21,33,34,35,36,37,38,39,30,31,32,44,45,46,47,48,49,40,41,42,
%U A226134 43,55,56,57,58,59,50,51,52,53,54,66,67,68,69,60,61,62,63,64,65,77,78,79,70,71,72,73,74,75,76,88,89,80,81,82,83,84,85,86,87
%N A226134 The partial digital sums of n from left to right mod 10 give the digits of a(n).
%C A226134 Inverse permutation to A098488.
%C A226134 Analogous to A006068 for the decimal base.
%C A226134 For any n, the sequence n, a(n), a(a(n)), a(a(a(n))),... is periodic.
%C A226134 The periods encountered between 0 and 10^6 are:
%C A226134 - 1 (n=0),
%C A226134 - 10 (n=10),
%C A226134 - 5 (n=20),
%C A226134 - 2 (n=50),
%C A226134 - 20 (n=100),
%C A226134 - 4 (n=500),
%C A226134 - 40 (n=10000),
%C A226134 - 8 (n=50000),
%C A226134 - 200 (n=100000),
%C A226134 - 25 (n=200000),
%C A226134 - 50 (n=200010),
%C A226134 - 100 (n=200100).
%H A226134 Paul Tek, <a href="/A226134/b226134.txt">Table of n, a(n) for n = 0..10000</a>
%H A226134 Paul Tek, <a href="/A226134/a226134.png">Parity of the decimal digits of n, a(n), a(a(n)), a(a(a(n))),... with n=200!</a>
%H A226134 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A226134 1       = 1 mod 10.
%e A226134 1+9     = 0 mod 10.
%e A226134 1+9+5   = 5 mod 10.
%e A226134 1+9+5+4 = 9 mod 10.
%e A226134 Hence, a(1954)=1059.
%t A226134 Table[With[{idn=IntegerDigits[n]},FromDigits[Table[Mod[Total[Take[idn,i]],10],{i,Length[idn]}]]],{n,0,90}] (* _Harvey P. Dale_, Mar 08 2015 *)
%o A226134 (PARI) a(n)=my(b); if(n<10, return(n), b=a(n\10); return(10*b + (b+n)%10))
%o A226134 (PARI) a(n) = my(v=digits(n)); for(i=2,#v, v[i]=(v[i]+v[i-1])%10); fromdigits(v); \\ _Kevin Ryde_, May 15 2020
%o A226134 (Haskell)
%o A226134 a226134 = foldl (\v d -> 10*v+d) 0 . scanl1 (\d x -> (x+d) `mod` 10) .
%o A226134           map (read . return) . show :: Int -> Int
%o A226134 -- _Reinhard Zumkeller_, Jun 03 2013
%Y A226134 Cf. A098488, A006068.
%K A226134 base,easy,nonn
%O A226134 0,3
%A A226134 _Paul Tek_, May 27 2013