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-10 of 35 results. Next

A285093 Corresponding values of arithmetic means of digits of numbers from A061383.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Apr 14 2017

Keywords

Crossrefs

Cf. A061383 (numbers with integer arithmetic mean of digits in base 10).
Sequences of numbers n such that a(n) = k for k = 1 - 9: A061384 (k = 1), A061385 (k = 2), A061386 (k = 3), A061387 (k = 4), A061388 (k = 5), A061423 (k = 6), A061424 (k = 7), A061425 (k = 8), A002283 (k = 9).
Cf. A004426, A004427, A257295 (supersequences).

Programs

  • Magma
    [0] cat [&+Intseq(n) / #Intseq(n): n in [1..100000] | &+Intseq(n) mod #Intseq(n) eq 0];
    
  • PARI
    lista(nn) = {for (n=0, nn, if (n, d = digits(n), d = [0]); if (!( vecsum(d) % #d), print1(vecsum(d)/#d, ", ")););} \\ Michel Marcus, Apr 15 2017

Formula

a(n) = A007953(A061383(n)) / A055642(A061383(n)) for n >= 1.

A004427 Arithmetic mean of digits of n (rounded up).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 1, 1, 1, 2, 2, 2, 3, 3
Offset: 0

Views

Author

Keywords

Comments

a(100)=1 is the first value that differs from the variant "... rounded to the nearest integer". - M. F. Hasler, May 10 2015

Crossrefs

Programs

  • Mathematica
    Ceiling[Mean[IntegerDigits[#]]]&/@Range[0,110] (* Harvey P. Dale, Aug 29 2014 *)
  • PARI
    A004427(n)=ceil(sum(i=1, #n=digits(n), n[i])/#n) \\ ...Vecsmall(Str(n))...-48 is a little faster. \\ M. F. Hasler, May 10 2015

Formula

From Reinhard Zumkeller, May 27 2010: (Start)
a(n) = ceiling(A007953(n)/A055642(n)); a(A000040(n)) = A074462(n);
A004426(n) <= a(n) with equality for n in A061383;
a(A178361(n)) = 1; a(A178362(n)) = 2; a(A178363(n)) = 3; a(A178364(n)) = 4; a(A178365(n)) = 5; a(A178366(n)) = 6; a(A178367(n)) = 7; a(A178368(n)) = 8; a(A178369(n)) = 9. (End)

A061388 Sum of digits = 5 times number of digits.

Original entry on oeis.org

5, 19, 28, 37, 46, 55, 64, 73, 82, 91, 159, 168, 177, 186, 195, 249, 258, 267, 276, 285, 294, 339, 348, 357, 366, 375, 384, 393, 429, 438, 447, 456, 465, 474, 483, 492, 519, 528, 537, 546, 555, 564, 573, 582, 591, 609, 618, 627, 636, 645, 654, 663, 672, 681
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			186 is a term as the arithmetic mean of the digits is (1+8+6)/3 = 5.
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..700] | &+Intseq(n) eq 5*#Intseq(n) ];  // Bruno Berselli, Jun 30 2011
  • Mathematica
    Select[Range[685],Total[x=IntegerDigits[#]]==5*Length[x] &]

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001

A061423 Sum of digits = 6 times number of digits.

Original entry on oeis.org

6, 39, 48, 57, 66, 75, 84, 93, 189, 198, 279, 288, 297, 369, 378, 387, 396, 459, 468, 477, 486, 495, 549, 558, 567, 576, 585, 594, 639, 648, 657, 666, 675, 684, 693, 729, 738, 747, 756, 765, 774, 783, 792, 819, 828, 837, 846, 855, 864, 873, 882, 891, 909
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			288 is a term as the arithmetic mean of the digits is (2+8+8)/3 = 6.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1000] | &+Intseq(n) eq 6*#Intseq(n)]; // Vincenzo Librandi, Jan 28 2016
  • Maple
    F:= proc(m,s)
    option remember;
    # list of all m-digit numbers with sum of digits s
    if s > 9*m or s < 0 then return [] fi;
    if m = 1 then return [s] fi;
    [seq(seq(op(map(`+`,procname(j,s-i),10^(m-1)*i)),j=1..m-1),i=1..min(9,s))]
    end proc:
    seq(op(F(m,6*m)),m=1..3); # Robert Israel, Jan 27 2016
  • Mathematica
    Select[Range[1000],Total[IntegerDigits[#]]==6*IntegerLength[#]&] (* Harvey P. Dale, Dec 20 2014 *)
  • PARI
    isok(n) = {digs = digits(n, 10); return(6*#digs == sum(k=1, #digs, digs[k]));} \\ Michel Marcus, Jul 31 2013
    

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001

A061425 Sum of digits = 8 times number of digits.

Original entry on oeis.org

8, 79, 88, 97, 699, 789, 798, 879, 888, 897, 969, 978, 987, 996, 5999, 6899, 6989, 6998, 7799, 7889, 7898, 7979, 7988, 7997, 8699, 8789, 8798, 8879, 8888, 8897, 8969, 8978, 8987, 8996, 9599, 9689, 9698, 9779, 9788, 9797, 9869, 9878, 9887, 9896, 9959
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			879 is a term as the arithmetic mean of the digits is (8+7+9)/3 = 8.
		

Crossrefs

Programs

  • Maple
    Q:= proc(n,t) option remember; local j,R;
          if t > 9*n or t <= 0 then return [] fi;
          R:= NULL;
          for j from 0 to min(t,9) do
            R:= R, op(map(s -> 10*s+j, procname(n-1,t-j)))
          od;
          [R]
    end proc;
    for i from 0 to 9 do Q(1,i):= [i] od:
    seq(op(sort(Q(d,8*d))),d=1..4); # Robert Israel, Dec 07 2020

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001

A061384 Numbers n such that sum of digits = number of digits.

Original entry on oeis.org

1, 11, 20, 102, 111, 120, 201, 210, 300, 1003, 1012, 1021, 1030, 1102, 1111, 1120, 1201, 1210, 1300, 2002, 2011, 2020, 2101, 2110, 2200, 3001, 3010, 3100, 4000, 10004, 10013, 10022, 10031, 10040, 10103, 10112, 10121, 10130, 10202, 10211
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Comments

Number of d-digit entries is A071976(d). - Robert Israel, Apr 06 2016
Equivalently, numbers n > 0 for which the arithmetic mean of the digits equals 1. - M. F. Hasler, Dec 07 2018

Examples

			120 is a term as the arithmetic mean of the digits is (1+2+0)/3 = 1.
		

Crossrefs

Totally balanced subset: A071154. Cf. also A061383-A061388, A061423-A061425.
Cf. A071976.
Cf. A007953 (sum of digits), A055642 (number of digits).

Programs

  • Magma
    [ n: n in [1..10215] | &+Intseq(n) eq #Intseq(n) ]; // Bruno Berselli, Jun 30 2011
    
  • Maple
    Q:= proc(n,s) option remember;
    # n-digit integers with digit sum s
    if s = 0 then []
    elif s = 1 then [10^(n-1)]
    elif n = 1 then
       if s <= 9 then [s]
       else []
       fi
    else
      map(op,[seq(map(t -> 10*t+i, procname(n-1,s-i)), i=0..min(9,s-1))])
    fi
    end proc:
    map(op, [seq(sort(Q(n,n)),n=1..5)]); # Robert Israel, Apr 06 2016
  • Mathematica
    Select[Range[15000], Total[IntegerDigits[#]] == IntegerLength[#]&] (* Harvey P. Dale, Jan 08 2011 *)
  • PARI
    isok(n) = (sumdigits(n)/#Str(n) == 1); \\ Michel Marcus, Mar 28 2016
    
  • PARI
    is_A061384(n)={sumdigits(n)==logint(n+!n,10)+1} \\ M. F. Hasler, Dec 07 2018
    
  • PARI
    A061384_row(n)={my(L=List(), u=vector(n, i, i==1), d); forvec(v=vector(n+1, i, [if(i>n,n, 1), if(i>1, n, 1)]), vecmax(d=v[^1]-v[^-1]+u)<10 && listput(L,fromdigits(d)),1);Vec(L)} \\ Return the list of all n-digit terms. - M. F. Hasler, Dec 07 2018
    
  • Python
    from itertools import count, islice
    def Q(n, s): # length-n strings of 0..9 with sum s, after Robert Israel
        if s == 0: yield "0"*n
        elif n == 1: yield (str(s) if s <= 9 else "")
        else:
            m = min(9, s) + 1
            yield from (str(i)+t for i in range(m) for t in Q(n-1, s-i))
    def agen():
        yield from (int(t) for n in count(1) for t in Q(n, n) if t[0] != "0")
    print(list(islice(agen(), 43))) # Michael S. Branicky, May 26 2022
    
  • Python
    from itertools import count, islice
    from collections import Counter
    from sympy.utilities.iterables import partitions, multiset_permutations
    def A061384_gen(): # generator of terms
        for l in count(1):
            for i in range(1,min(l,9)+1):
                yield from sorted(int(str(i)+''.join(map(str,j))) for s,p in partitions(l-i,k=9,size=True) for j in multiset_permutations([0]*(l-1-s)+list(Counter(p).elements())))
    A061384_list = list(islice(A061384_gen(),30)) # Chai Wah Wu, Nov 28 2023

Formula

{n > 0 | A007953(n) = A055642(n)}. - M. F. Hasler, Dec 07 2018

Extensions

More terms from Erich Friedman, May 08 2001

A059708 Numbers k such that all digits have same parity.

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, 111, 113, 115, 117, 119, 131, 133, 135, 137, 139
Offset: 1

Views

Author

N. J. A. Sloane, Feb 07 2001

Keywords

Comments

A059717(a(n)) = a(n). - Reinhard Zumkeller, Jul 05 2011
A059707(a(n)) = a(n). - Reinhard Zumkeller, Jun 15 2012

Crossrefs

Union of A014261 and A014263.

Programs

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

A061424 Sum of digits = 7 times number of digits.

Original entry on oeis.org

7, 59, 68, 77, 86, 95, 399, 489, 498, 579, 588, 597, 669, 678, 687, 696, 759, 768, 777, 786, 795, 849, 858, 867, 876, 885, 894, 939, 948, 957, 966, 975, 984, 993, 1999, 2899, 2989, 2998, 3799, 3889, 3898, 3979, 3988, 3997, 4699, 4789, 4798, 4879, 4888, 4897
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			498 is a term as the arithmetic mean of the digits is (4+9+8)/3 = 7.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L;
      L:= convert(n,base,10);
      convert(L,`+`)=nops(L)*7
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Dec 07 2020
  • Mathematica
    Select[Range[5000],Total[IntegerDigits[#]]==7IntegerLength[#]&] (* Harvey P. Dale, Oct 22 2022 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 16 2001
Offset changed by Robert Israel, Dec 07 2020

A062179 Harmonic mean of digits is an integer.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 26, 33, 36, 44, 55, 62, 63, 66, 77, 88, 99, 111, 136, 144, 163, 222, 236, 244, 263, 288, 316, 326, 333, 346, 361, 362, 364, 414, 424, 436, 441, 442, 444, 463, 488, 555, 613, 623, 631, 632, 634, 643, 666, 777, 828, 848, 882, 884
Offset: 1

Views

Author

Vladeta Jovovic, Jun 12 2001

Keywords

Examples

			1236 is a term as the harmonic mean is 4/(1+1/2+1/3+1/6) = 2.
		

Crossrefs

Programs

  • Mathematica
    Do[ h = IntegerDigits[n]; If[ Sort[h] [[1]] != 0 && IntegerQ[ Length[h] / Apply[ Plus, 1/h] ], Print[n]], {n, 1, 10^4} ] Note that the number of entries <= 10^n are 9, 22, 61, 198, 927, 4738, 24620, 130093,
    hmdiQ[n_]:=DigitCount[n,10,0]==0&&IntegerQ[HarmonicMean[ IntegerDigits[ n]]]; Select[Range[1000],hmdiQ] (* Harvey P. Dale, Sep 22 2012 *)

Extensions

More terms from Robert G. Wilson v, Aug 08 2001
Showing 1-10 of 35 results. Next