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.

A209871 Quasi-Niven (or Quasi-Harshad) numbers: numbers that divided by the sum of their digits leave 1 as remainder.

This page as a plain text file.
%I A209871 #17 Mar 16 2023 12:13:37
%S A209871 11,13,17,41,43,56,91,97,101,106,121,131,155,157,161,181,188,221,232,
%T A209871 233,239,254,271,274,301,305,311,353,361,365,385,391,401,421,451,452,
%U A209871 491,494,508,521,529,541,551,599,610,617,625,631,647,650,673,685,721
%N A209871 Quasi-Niven (or Quasi-Harshad) numbers: numbers that divided by the sum of their digits leave 1 as remainder.
%C A209871 Numbers n for which [n mod s(n)]=1, where s(n) is the sum of the digits of n.
%C A209871 z-Niven numbers with A=1 and B=-1 (see comment in A005349).
%C A209871 First pair of consecutive numbers is {232,233}.
%H A209871 Paolo P. Lava, <a href="/A209871/b209871.txt">Table of n, a(n) for n = 1..10000</a>
%e A209871 s(43)=7 and 6*7+1=43.
%p A209871 with(numtheory);
%p A209871 A209871:=proc(i)
%p A209871 local a,b,n;
%p A209871 for n from 1 to i do
%p A209871   a:=n; b:=0;
%p A209871   while a>0 do b:=b+(a mod 10); a:=trunc(a/10); od;
%p A209871   a:=n mod b; if a=1 then print(n); fi;
%p A209871 od; end:
%p A209871 A209871(10000);
%o A209871 (Magma) [n: n in [1..721] | n mod s eq 1 where s is &+Intseq(n)]; // _Bruno Berselli_, Mar 29 2012
%Y A209871 Cf. A005349.
%K A209871 nonn,base
%O A209871 1,1
%A A209871 _Paolo P. Lava_, Mar 29 2012