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 19 results. Next

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

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

A062185 Harmonic mean of digits is 8.

Original entry on oeis.org

8, 88, 888, 6999, 8888, 9699, 9969, 9996, 68999, 69899, 69989, 69998, 86999, 88888, 89699, 89969, 89996, 96899, 96989, 96998, 98699, 98969, 98996, 99689, 99698, 99869, 99896, 99968, 99986, 688999, 689899, 689989, 689998, 698899, 698989
Offset: 1

Views

Author

Vladeta Jovovic, Jun 12 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ h = IntegerDigits[n]; If[ Sort[h][[1]] != 0 && Length[h]/Apply[Plus, 1/h] == 8, Print[n]], {n, 1, 10^6}]
    Select[Range[700000],DigitCount[#,10,0]==0&&HarmonicMean[IntegerDigits[ #]]==8&] (* Harvey P. Dale, Jan 27 2012 *)

Extensions

More terms from Robert G. Wilson v, Aug 08 2001

A061385 Numbers n such that sum of digits = twice number of digits.

Original entry on oeis.org

2, 13, 22, 31, 40, 105, 114, 123, 132, 141, 150, 204, 213, 222, 231, 240, 303, 312, 321, 330, 402, 411, 420, 501, 510, 600, 1007, 1016, 1025, 1034, 1043, 1052, 1061, 1070, 1106, 1115, 1124, 1133, 1142, 1151, 1160, 1205, 1214, 1223, 1232, 1241, 1250, 1304
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

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

Crossrefs

Programs

  • Magma
    [ n: n in [1..1310] | &+Intseq(n) eq 2*#Intseq(n) ];  // Bruno Berselli, Jun 30 2011
  • Maple
    S:= proc(d,k,flag) option remember;
      if d = 1 then
        if k >= 0 and k <= 9 then return [k]
        else return []
        fi
      fi;
      [seq(op(map(`+`, procname(d-1,k-i,0), i*10^(d-1))),i=flag..min(k,9))]
    end proc:
    seq(op(S(d,2*d,1)),d=1..5); # Robert Israel, Apr 23 2017

Extensions

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

A061387 Sum of digits = 4 times number of digits.

Original entry on oeis.org

4, 17, 26, 35, 44, 53, 62, 71, 80, 129, 138, 147, 156, 165, 174, 183, 192, 219, 228, 237, 246, 255, 264, 273, 282, 291, 309, 318, 327, 336, 345, 354, 363, 372, 381, 390, 408, 417, 426, 435, 444, 453, 462, 471, 480, 507, 516, 525, 534, 543, 552, 561, 570, 606
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

			147 is a term as the arithmetic mean of the digits is (1+4+7)/3 = 4.
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..610] | &+Intseq(n) eq 4*#Intseq(n) ];  // Bruno Berselli, Jun 30 2011

Extensions

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

A061386 Sum of digits = 3 times number of digits.

Original entry on oeis.org

3, 15, 24, 33, 42, 51, 60, 108, 117, 126, 135, 144, 153, 162, 171, 180, 207, 216, 225, 234, 243, 252, 261, 270, 306, 315, 324, 333, 342, 351, 360, 405, 414, 423, 432, 441, 450, 504, 513, 522, 531, 540, 603, 612, 621, 630, 702, 711, 720, 801, 810, 900, 1029
Offset: 1

Views

Author

Amarnath Murthy, May 03 2001

Keywords

Examples

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

Crossrefs

Programs

  • Magma
    [ n: n in [1..1030] | &+Intseq(n) eq 3*#Intseq(n) ];  // Bruno Berselli, Jun 30 2011
  • Mathematica
    Select[Range[1200],3IntegerLength[#]==Total[IntegerDigits[#]]&]  (* Harvey P. Dale, Feb 04 2011 *)

Extensions

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

A285226 Primes with integer arithmetic mean of digits = 5 in base 10.

Original entry on oeis.org

5, 19, 37, 73, 1289, 1487, 1559, 1667, 1847, 1973, 2099, 2297, 2459, 2477, 2549, 2657, 2693, 2729, 2819, 2837, 2909, 2927, 2963, 3089, 3359, 3449, 3467, 3539, 3557, 3593, 3719, 3863, 3881, 3917, 4079, 4259, 4349, 4457, 4493, 4547, 4583, 4637, 4673, 4691, 4817
Offset: 1

Views

Author

Jaroslav Krizek, Apr 19 2017

Keywords

Crossrefs

Primes from A061388. Subsequence of A069709.
Sequences of primes such that a(n) = k for k = 1, 2, 4, 5, 7 and 8: A069710 (k = 1), A285096 (k = 2), A285225 (k = 4), this sequence (k = 5), A285227 (k = 7), A285228 (k = 8).

Programs

  • Magma
    [n: n in [1..100000] | IsPrime(n) and &+Intseq(n) mod #Intseq(n) eq 0 and &+Intseq(n) / #Intseq(n) eq 5];
  • Mathematica
    Select[Prime@ Range@ PrimePi@ 5000, Mean@ IntegerDigits@ # == 5 &] (* Michael De Vlieger, Apr 22 2017 *)
Showing 1-10 of 19 results. Next