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.

A061383 Arithmetic mean of digits is an integer.

This page as a plain text file.
%I A061383 #30 Apr 23 2025 18:53:00
%S A061383 0,1,2,3,4,5,6,7,8,9,11,13,15,17,19,20,22,24,26,28,31,33,35,37,39,40,
%T A061383 42,44,46,48,51,53,55,57,59,60,62,64,66,68,71,73,75,77,79,80,82,84,86,
%U A061383 88,91,93,95,97,99,102,105,108,111,114,117,120,123,126,129
%N A061383 Arithmetic mean of digits is an integer.
%C A061383 A004426(a(n)) = A004427(a(n)). - _Reinhard Zumkeller_, May 27 2010
%C A061383 A175688 is a subsequence; complement of A180157; A180160(a(n))=0. - _Reinhard Zumkeller_, Aug 15 2010
%C A061383 It seems "obvious" that n log n << a(n) < n log n; is this true? - _Charles R Greathouse IV_, Feb 06 2013
%H A061383 Reinhard Zumkeller, <a href="/A061383/b061383.txt">Table of n, a(n) for n = 0..10000</a>
%e A061383 123 is a term as the arithmetic mean is (1+2+3)/3 = 2.
%t A061383 Select[Range[0,129],IntegerQ[Total[x=IntegerDigits[#]]/Length[x]] &] (* _Jayanta Basu_, May 17 2013 *)
%t A061383 Select[Range[0,200],IntegerQ[Mean[IntegerDigits[#]]]&] (* _Harvey P. Dale_, Dec 31 2022 *)
%o A061383 (Magma) [0] cat [n: n in [1..130] | IsZero(&+Intseq(n) mod #Intseq(n))];  // _Bruno Berselli_, Jun 30 2011
%o A061383 (Magma) [0] cat [n: n in [1..130] | IsIntegral(&+Intseq(n)/#Intseq(n))];   // _Bruno Berselli_, Feb 09 2016
%o A061383 (PARI) is(n)=my(v=digits(n));sum(i=1,#v,v[i])%#v==0 \\ _Charles R Greathouse IV_, Feb 06 2013
%o A061383 (Haskell)
%o A061383 a061383 n = a061383_list !! (n-1)
%o A061383 a061383_list = filter (\x -> mod (a007953 x) (a055642 x) == 0) [0..]
%o A061383 -- _Reinhard Zumkeller_, Jun 18 2013
%o A061383 (Python)
%o A061383 def ok(n): return n == 0 or sum(d:=list(map(int, str(n))))%len(d) == 0
%o A061383 print([k for k in range(130) if ok(k)]) # _Michael S. Branicky_, Apr 23 2025
%Y A061383 Cf. A007953, A055642.
%Y A061383 Cf. A004426, A004427.
%Y A061383 Cf. A175688, A180157, A180160.
%K A061383 nonn,easy,base
%O A061383 0,3
%A A061383 _Amarnath Murthy_, May 03 2001