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.

Showing 1-5 of 5 results.

A061383 Arithmetic mean of digits is an integer.

Original entry on oeis.org

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, 42, 44, 46, 48, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 71, 73, 75, 77, 79, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129
Offset: 0

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Comments

A004426(a(n)) = A004427(a(n)). - Reinhard Zumkeller, May 27 2010
A175688 is a subsequence; complement of A180157; A180160(a(n))=0. - Reinhard Zumkeller, Aug 15 2010
It seems "obvious" that n log n << a(n) < n log n; is this true? - Charles R Greathouse IV, Feb 06 2013

Examples

			123 is a term as the arithmetic mean is (1+2+3)/3 = 2.
		

Crossrefs

Programs

  • Haskell
    a061383 n = a061383_list !! (n-1)
    a061383_list = filter (\x -> mod (a007953 x) (a055642 x) == 0) [0..]
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Magma
    [0] cat [n: n in [1..130] | IsZero(&+Intseq(n) mod #Intseq(n))];  // Bruno Berselli, Jun 30 2011
    
  • Magma
    [0] cat [n: n in [1..130] | IsIntegral(&+Intseq(n)/#Intseq(n))];   // Bruno Berselli, Feb 09 2016
    
  • Mathematica
    Select[Range[0,129],IntegerQ[Total[x=IntegerDigits[#]]/Length[x]] &] (* Jayanta Basu, May 17 2013 *)
    Select[Range[0,200],IntegerQ[Mean[IntegerDigits[#]]]&] (* Harvey P. Dale, Dec 31 2022 *)
  • PARI
    is(n)=my(v=digits(n));sum(i=1,#v,v[i])%#v==0 \\ Charles R Greathouse IV, Feb 06 2013
    
  • Python
    def ok(n): return n == 0 or sum(d:=list(map(int, str(n))))%len(d) == 0
    print([k for k in range(130) if ok(k)]) # Michael S. Branicky, Apr 23 2025

A052018 Numbers k with the property that the sum of the digits of k is a substring of k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 109, 119, 129, 139, 149, 159, 169, 179, 189, 199, 200, 300, 400, 500, 600, 700, 800, 900, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 1000, 1009, 1018, 1027, 1036, 1045, 1054, 1063
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (isInfixOf)
    a052018 n = a052018_list !! (n-1)
    a052018_list = filter f [0..] where
       f x = show (a007953 x) `isInfixOf` show x
    -- Reinhard Zumkeller, Jun 18 2013
    
  • Mathematica
    sdssQ[n_]:=Module[{idn=IntegerDigits[n],s,len},s=Total[idn];len= IntegerLength[ s]; MemberQ[Partition[idn,len,1],IntegerDigits[s]]]; Join[{0},Select[Range[1100],sdssQ]] (* Harvey P. Dale, Jan 02 2013 *)
  • Python
    loop = (str(n) for n in range(399))
    print([int(n) for n in loop if str(sum(int(k) for k in n)) in n]) # Jonathan Frech, Jun 05 2017

A004426 Arithmetic mean of digits of n (rounded down).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 0, 0, 1, 1, 1, 2, 2, 2
Offset: 0

Views

Author

Keywords

Comments

From Reinhard Zumkeller, May 27 2010: (Start)
A004427(n) <= a(n);
a(A061383(n)) = A004427(A061383(n));
a(A000040(n)) = A074461(n). (End)

Crossrefs

Cf. A175688.

Programs

Formula

a(n) = floor(A007953(n)/A055642(n)). - Reinhard Zumkeller, May 27 2010

A378560 Numbers with the median of the digits equal to one of the digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140
Offset: 1

Views

Author

Stefano Spezia, Nov 30 2024

Keywords

Examples

			10 is not in the list because the median of its digits is not integer.
13 is not in the list because the median of its digits is 2 which is not a digit of 13.
113 is in the list because the median of its digits is 1 which is a digit of 113.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,140],MemberQ[digits=IntegerDigits[#],Median[digits]] &]

A175758 Numbers n with property that arithmetic mean of its digits is both an integer and one of the prime factors of n.

Original entry on oeis.org

2, 3, 5, 7, 15, 22, 24, 33, 40, 42, 51, 55, 60, 77, 108, 114, 117, 126, 132, 135, 144, 150, 153, 162, 171, 180, 195, 204, 207, 216, 222, 225, 234, 240, 243, 252, 261, 270, 285, 306, 312, 315, 324, 330, 333, 342, 351, 360, 375, 399, 402, 405, 414, 420, 423, 432
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 28 2010, Aug 29 2010

Keywords

Examples

			15 is in the list because (1+5)/2=3 and 3 is a prime factor of 15.
		

Crossrefs

Programs

  • Mathematica
    ipfQ[n_]:=Module[{m=Mean[IntegerDigits[n]]},IntegerQ[m]&&MemberQ[ FactorInteger[ n][[All,1]],m]]; Select[Range[2,500],ipfQ] (* Harvey P. Dale, Feb 15 2020 *)

Extensions

399 inserted by D. S. McNeil, Sep 27 2010
Showing 1-5 of 5 results.