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.

A141022 a(n) = n mod ((sum of digits of n)+1).

This page as a plain text file.
%I A141022 #16 Jul 16 2025 10:05:43
%S A141022 0,1,2,3,4,5,6,7,8,9,0,2,0,3,2,1,0,8,8,8,2,1,2,5,3,1,8,7,6,5,2,1,2,5,
%T A141022 2,8,6,4,2,0,0,5,0,3,8,5,2,11,9,7,2,2,4,8,4,0,8,5,2,14,4,5,8,3,9,5,1,
%U A141022 11,8,5,6,8,2,7,2,10,6,2,14,11,8,1,5,11
%N A141022 a(n) = n mod ((sum of digits of n)+1).
%H A141022 Robert Israel, <a href="/A141022/b141022.txt">Table of n, a(n) for n = 0..10000</a>
%p A141022 P:=proc(n) local i, k, w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-trunc(k/10)*10; k:=trunc(k/10); od; print(i mod (w+1)); od; end: P(1000);
%t A141022 a[n_]:=Mod[n,DigitSum[n]+1];Array[a,84,0] (* _James C. McMahon_, Jul 16 2025 *)
%o A141022 (PARI) a(n) = n % (1+sumdigits(n)); \\ _Michel Marcus_, Jun 04 2014
%Y A141022 Cf. A007953.
%K A141022 nonn,base,less
%O A141022 0,3
%A A141022 Olivier Bouaziz (olivier.bouaziz(AT)arcelormittal.com), Jul 29 2008
%E A141022 More terms from _Michel Marcus_, Jun 04 2014