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.

Previous Showing 21-30 of 411 results. Next

A052221 Numbers whose sum of digits is 7.

Original entry on oeis.org

7, 16, 25, 34, 43, 52, 61, 70, 106, 115, 124, 133, 142, 151, 160, 205, 214, 223, 232, 241, 250, 304, 313, 322, 331, 340, 403, 412, 421, 430, 502, 511, 520, 601, 610, 700, 1006, 1015, 1024, 1033, 1042, 1051, 1060, 1105, 1114, 1123, 1132, 1141, 1150, 1204
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

A007953(a(n)) = 7; number of repdigits = #{7,1111111} = A242627(7) = 2. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Supersequence of A119461.
Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a052221 n = a052221_list !! (n-1)
    a052221_list = filter ((== 7) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..1500] | &+Intseq(n) eq 7 ]; // Vincenzo Librandi, Mar 08 2013
    
  • Mathematica
    Select[Range[1500],Total[IntegerDigits[#]]==7&] (* Harvey P. Dale, Apr 11 2012 *)
  • Python
    def ok(n): return sum(map(int, str(n))) == 7
    print(list(filter(ok, range(1205)))) # Michael S. Branicky, Jul 16 2021
    
  • Python
    # faster version generating initial segment
    from sympy.utilities.iterables import multiset_permutations
    def auptodigs(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            digset = "0"*(d-1) + "1111111222334567"
            for p in multiset_permutations(digset, d):
                if p[0] != '0' and sum(map(int, p)) == 7:
                    alst.append(int("".join(p)))
        return alst
    print(auptodigs(4)) # Michael S. Branicky, Jul 16 2021

Extensions

Offset changed from Bruno Berselli, Mar 07 2013

A052223 Numbers whose sum of digits is 9.

Original entry on oeis.org

9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 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
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

Any term of this sequence with an 11 appended cannot have 11 as prime factor. See A075154. [Lekraj Beedassy, Sep 27 2009]
A007953(a(n)) = 9; number of repdigits = #{9,333,1^9} = A242627(9) = 3. - Reinhard Zumkeller, Jul 17 2014
A010872(a(n)) = A010878(a(n)) = 0. - Ilya Gutkovskiy, Jun 04 2016

Crossrefs

Cf. A007953.
Row n=9 of A245062.
Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a052223 n = a052223_list !! (n-1)
    a052223_list = filter ((== 9) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
  • Magma
    [n: n in [1..1500] | &+Intseq(n) eq 9 ]; // Vincenzo Librandi, Mar 08 2013
    
  • Mathematica
    Select[Range[1500], Total[IntegerDigits[#]] == 9 &] (* Vincenzo Librandi, Mar 08 2013 *)

Extensions

More terms from Larry Reeves (Larryr(AT)acm.org), Sep 05 2000
Offset changed by Bruno Berselli, Mar 07 2013

A166311 Numbers whose sum of digits is 11.

Original entry on oeis.org

29, 38, 47, 56, 65, 74, 83, 92, 119, 128, 137, 146, 155, 164, 173, 182, 191, 209, 218, 227, 236, 245, 254, 263, 272, 281, 290, 308, 317, 326, 335, 344, 353, 362, 371, 380, 407, 416, 425, 434, 443, 452, 461, 470, 506, 515, 524, 533, 542, 551, 560, 605, 614
Offset: 1

Views

Author

Vincenzo Librandi, Oct 11 2009

Keywords

Comments

A007953(a(n)) = 11; number of repdigits = A242627(11) = 1. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Magma
    [n: n in [1..620] | &+Intseq(n) eq 11]; // Vincenzo Librandi, Mar 07 2013
  • Mathematica
    Select[Range[620], Total[IntegerDigits[#]] == 11&] (* Vincenzo Librandi, Mar 07 2013 *)

Extensions

Edited by N. J. A. Sloane, Oct 12 2009

A052219 Numbers whose sum of digits is 5.

Original entry on oeis.org

5, 14, 23, 32, 41, 50, 104, 113, 122, 131, 140, 203, 212, 221, 230, 302, 311, 320, 401, 410, 500, 1004, 1013, 1022, 1031, 1040, 1103, 1112, 1121, 1130, 1202, 1211, 1220, 1301, 1310, 1400, 2003, 2012, 2021, 2030, 2102, 2111, 2120, 2201, 2210, 2300, 3002
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

A007953(a(n)) = 5; number of repdigits = #{5,11111} = A242627(5) = 2. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A007953.
Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a052219 n = a052219_list !! (n-1)
    a052219_list = filter ((== 5) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..3010] | &+Intseq(n) eq 5 ]; // Vincenzo Librandi, Mar 07 2013
    
  • Mathematica
    Select[Range[10^4], Total[IntegerDigits[#]] == 5 &] (* Vincenzo Librandi, Mar 07 2013 *)
    Union[Flatten[Table[FromDigits /@ Permutations[PadRight[s, 9]], {s, IntegerPartitions[5]}]]] (* T. D. Noe, Mar 08 2013 *)
  • PARI
    isok(n) = sumdigits(n) == 5; \\ Michel Marcus, Dec 28 2015
    
  • Python
    from sympy.utilities.iterables import multiset_permutations
    def auptodigs(maxdigits):
      alst = [5]
      for d in range(2, maxdigits+1):
        fulldigset = list("0"*(d-1) + "1111122345")
        for firstdig in "12345":
          target_sum, restdigset = 5-int(firstdig), fulldigset[:]
          restdigset.remove(firstdig)
          for p in multiset_permutations(restdigset, d-1):
            if sum(map(int, p)) == target_sum:
              alst.append(int(firstdig+"".join(p)))
              if int(p[0]) == target_sum: break
      return alst
    print(auptodigs(4)) # Michael S. Branicky, May 14 2021

Extensions

Offset changed from Bruno Berselli, Mar 07 2013

A052222 Numbers whose sum of digits is 8.

Original entry on oeis.org

8, 17, 26, 35, 44, 53, 62, 71, 80, 107, 116, 125, 134, 143, 152, 161, 170, 206, 215, 224, 233, 242, 251, 260, 305, 314, 323, 332, 341, 350, 404, 413, 422, 431, 440, 503, 512, 521, 530, 602, 611, 620, 701, 710, 800, 1007, 1016, 1025, 1034, 1043, 1052, 1061
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

A007953(a(n)) = 8; number of repdigits = #{8,44,2222,1^8} = A242627(8) = 4. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A007953.
Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a052222 n = a052222_list !! (n-1)
    a052222_list = filter ((== 8) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..1500] | &+Intseq(n) eq 8 ]; // Vincenzo Librandi, Mar 08 2013
    
  • Mathematica
    Select[Range[1500], Total[IntegerDigits[#]] == 8 &] (* Vincenzo Librandi, Mar 08 2013 *)
  • Python
    from sympy.utilities.iterables import multiset_permutations
    def auptodigs(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            digset = "0"*(d-1) + "11111111222233445678"
            for p in multiset_permutations(digset, d):
                if p[0] != '0' and sum(map(int, p)) == 8:
                    alst.append(int("".join(p)))
        return alst
    print(auptodigs(4)) # Michael S. Branicky, Aug 17 2021

Extensions

Offset changed from Bruno Berselli, Mar 07 2013

A052220 Numbers whose sum of digits is 6.

Original entry on oeis.org

6, 15, 24, 33, 42, 51, 60, 105, 114, 123, 132, 141, 150, 204, 213, 222, 231, 240, 303, 312, 321, 330, 402, 411, 420, 501, 510, 600, 1005, 1014, 1023, 1032, 1041, 1050, 1104, 1113, 1122, 1131, 1140, 1203, 1212, 1221, 1230, 1302, 1311, 1320, 1401, 1410
Offset: 1

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

A007953(a(n)) = 6; number of repdigits = #{6,33,222,111111} = A242627(6) = 4. - Reinhard Zumkeller, Jul 17 2014
There are binomial(t + 4, 5) terms having exactly t digits. Therefore binomial(t + 5, 6) have at most t digits. - David A. Corneth, Jun 29 2025

Examples

			1023 is in the sequence as it has digital sum 1 + 0 + 2 + 3 = 6. - _David A. Corneth_, Jun 29 2025
		

Crossrefs

Cf. A007953.
Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a052220 n = a052220_list !! (n-1)
    a052220_list = filter ((== 6) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Magma
    [n: n in [1..1500] | &+Intseq(n) eq 6 ]; // Vincenzo Librandi, Mar 07 2013
    
  • Mathematica
    Select[Range[10^4], Total[IntegerDigits[#]] == 6 &] (* Vincenzo Librandi, Mar 07 2013 *)
  • PARI
    nxt(n) = {my(v, c, toadd); v = valuation(n, 10); c = (n / 10^v)%10; toadd = 10^(v)*(10 - c) + c - 1; return(n + toadd)} \\ David A. Corneth, Jun 29 2025
  • Python
    from sympy.utilities.iterables import multiset_permutations
    def auptodigs(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            digset = "0"*(d-1) + "11111122233456"
            for p in multiset_permutations(digset, d):
                if p[0] != '0' and sum(map(int, p)) == 6:
                    alst.append(int("".join(p)))
        return alst
    print(auptodigs(4)) # Michael S. Branicky, Jun 15 2021
    

Formula

a(n) = a(n-1) + 10^v * (10 - c) + c-1 where c is the last nonzero digit of a(n) and v is the 10-adic valuation of a(n-1) and n > 1. - David A. Corneth, Jun 29 2025

Extensions

Offset changed by Bruno Berselli, Mar 07 2013

A166459 Numbers whose sum of digits is 19.

Original entry on oeis.org

199, 289, 298, 379, 388, 397, 469, 478, 487, 496, 559, 568, 577, 586, 595, 649, 658, 667, 676, 685, 694, 739, 748, 757, 766, 775, 784, 793, 829, 838, 847, 856, 865, 874, 883, 892, 919, 928, 937, 946, 955, 964, 973, 982, 991, 1099, 1189, 1198, 1279, 1288
Offset: 1

Views

Author

Vincenzo Librandi, Oct 14 2009

Keywords

Comments

A007953(a(n)) = 19; number of repdigits = A242627(19) = 1. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A235229 (20).

Programs

  • Haskell
    a166459 n = a166459_list !! (n-1)
    a166459_list = filter ((== 19) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
  • Magma
    [n: n in [1..1500] | &+Intseq(n) eq 19]; // Vincenzo Librandi, Sep 13 2013
    
  • Mathematica
    Select[Range[1500],Total[IntegerDigits[#]]==19&] (* Harvey P. Dale, Jul 19 2011 *)

A143164 Numbers with digitsum 13, in increasing order.

Original entry on oeis.org

49, 58, 67, 76, 85, 94, 139, 148, 157, 166, 175, 184, 193, 229, 238, 247, 256, 265, 274, 283, 292, 319, 328, 337, 346, 355, 364, 373, 382, 391, 409, 418, 427, 436, 445, 454, 463, 472, 481, 490, 508, 517, 526, 535, 544, 553, 562, 571, 580, 607, 616, 625, 634, 643, 652
Offset: 1

Views

Author

Wolfdieter Lang, Sep 15 2008

Keywords

Comments

If 13 is considered as an 'unlucky' number: the 'unlucky years'.
A007953(a(n)) = 13; number of repdigits = A242627(13) = 1. - Reinhard Zumkeller, Jul 17 2014

Examples

			2029 is the next 'unlucky year'. Solution to the guardian weekly puzzle.
a(10^ 1) = 166
a(10^ 2) = 1309
a(10^ 3) = 21370
a(10^ 4) = 1100254
a(10^ 5) = 111032122
a(10^ 6) = 30611101000
a(10^ 7) = 40100300100301
a(10^ 8) = 200011001012211010
a(10^ 9) = 10001220000100012002100
a(10^10) = 1100000001010021010000000230 - _David A. Corneth_, Jan 31 2015
		

References

  • The Guardian Weekly, July 25-31, 2008, p.39 puzzles 5., p31.

Crossrefs

Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a143164 n = a143164_list !! (n-1)
    a143164_list = filter ((== 13) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
    
  • Mathematica
    f[n_] := Rest@ Select[Range@ n, NestWhile[Plus @@ IntegerDigits[#] &, #, # > 14 &] == 13 &]; f@ 652 (* Michael De Vlieger, Feb 03 2015 *)
    Select[Range[700],Total[IntegerDigits[#]]==13&] (* Harvey P. Dale, Oct 11 2017 *)
  • PARI
    \\This algorithm needs a modified binomial.
    C(n,k)=if(n>=k,binomial(n,k),0)
    \\ways to roll s-q with q dice having sides 0 through n - 1.
    b(s,q,n)=if(s<=q*(n-1),s+=q;sum(i=0,q-1,(-1)^i*C(q,i)*C(s-1-n*i,q-1)),0)
    \\main algorithm
    a(n) = {my(q); q = 2; while(b(13, q, 10) < n, q++); q--; s = 13; os = 13; r=0; while(q, if(b(s,q,10) < n, n-=b(s,q,10);s--, r+=(os-s)*10^(q); os = s; q--)); r+= s;r}
    \\inverse
    inv(n)={r = 1; v=digits(n); l=v[#v]; forstep(i = #v-1, 1, -1, for(j=1, v[i], r+=b(l+j, #v-i, 10)); l+=v[i]); r} \\ David A. Corneth, Jan 31 2015
    
  • PARI
    transform(n,b)=my(d=digits(n),nd=#d,v=vector(b,i,[i\10,b-(b+1-i)\10]),k); v[b][2]=d[1]; v
    list(lim)=my(v=List(),d=transform(lim\=1,13)); forvec(u=transform(lim\1,13), if(u[4]Charles R Greathouse IV, May 30 2019

Formula

digitsum(a(n))=13, ordered increasingly.

A235151 Numbers whose sum of digits is 12.

Original entry on oeis.org

39, 48, 57, 66, 75, 84, 93, 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

Vincenzo Librandi, Jan 04 2014

Keywords

Comments

A007953(a(n)) = 12; number of repdigits = #{66,444,3333,222222,1^12} = A242627(12) = 5. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A143164 (13), A235225(14), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a235151 n = a235151_list !! (n-1)
    a235151_list = filter ((== 12) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
  • Magma
    [n: n in [1..1000] | &+Intseq(n) eq 12];
    
  • Mathematica
    Select[Range[2000], Total[IntegerDigits[#]]==12&]

A235227 Numbers whose sum of digits is 16.

Original entry on oeis.org

79, 88, 97, 169, 178, 187, 196, 259, 268, 277, 286, 295, 349, 358, 367, 376, 385, 394, 439, 448, 457, 466, 475, 484, 493, 529, 538, 547, 556, 565, 574, 583, 592, 619, 628, 637, 646, 655, 664, 673, 682, 691, 709, 718, 727, 736, 745, 754, 763, 772, 781, 790
Offset: 1

Views

Author

Vincenzo Librandi, Jan 05 2014

Keywords

Comments

A007953(a(n)) = 16; number of repdigits = #{88,4444,22222222,1^16} = A242627(16) = 4. - Reinhard Zumkeller, Jul 17 2014

Crossrefs

Cf. A011557 (1), A052216 (2), A052217 (3), A052218 (4), A052219 (5), A052220 (6), A052221 (7), A052222 (8), A052223 (9), A052224 (10), A166311 (11), A235151 (12), A143164 (13), A235225(14), A235226 (15), A166370 (17), A235228 (18), A166459 (19), A235229 (20).

Programs

  • Haskell
    a235227 n = a235227_list !! (n-1)
    a235227_list = filter ((== 16) . a007953) [0..]
    -- Reinhard Zumkeller, Jul 17 2014
  • Magma
    [n: n in [1..1000] | &+Intseq(n) eq 16];
    
  • Mathematica
    Select[Range[1000], Total[IntegerDigits[#]]==16 &]
Previous Showing 21-30 of 411 results. Next