[go: up one dir, main page]

login
Search: a052216 -id:a052216
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers whose sum of digits is 6.
+10
34
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,1
COMMENTS
A007953(a(n)) = 6; number of repdigits = #{6,33,222,111111} = A242627(6) = 4. - Reinhard Zumkeller, Jul 17 2014
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..12376 (terms 1..924 from Vincenzo Librandi; all terms with <= 12 digits)
MATHEMATICA
Select[Range[10^4], Total[IntegerDigits[#]] == 6 &] (* Vincenzo Librandi, Mar 07 2013 *)
PROG
(Magma) [n: n in [1..1500] | &+Intseq(n) eq 6 ]; // Vincenzo Librandi, Mar 07 2013
(Haskell)
a052220 n = a052220_list !! (n-1)
a052220_list = filter ((== 6) . a007953) [0..]
-- Reinhard Zumkeller, Jul 17 2014
(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
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).
KEYWORD
nonn,base,easy
AUTHOR
Henry Bottomley, Feb 01 2000
EXTENSIONS
Offset changed from Bruno Berselli, Mar 07 2013
STATUS
approved
Numbers whose sum of digits is 19.
+10
34
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,1
COMMENTS
A007953(a(n)) = 19; number of repdigits = A242627(19) = 1. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[1500], Total[IntegerDigits[#]]==19&] (* Harvey P. Dale, Jul 19 2011 *)
PROG
(Magma) [n: n in [1..1500] | &+Intseq(n) eq 19]; // Vincenzo Librandi, Sep 13 2013
(Haskell)
a166459 n = a166459_list !! (n-1)
a166459_list = filter ((== 19) . a007953) [0..]
-- 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).
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Oct 14 2009
STATUS
approved
Numbers with digitsum 13, in increasing order.
+10
33
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,1
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
REFERENCES
The Guardian Weekly, July 25-31, 2008, p.39 puzzles 5., p31.
LINKS
Wolfdieter Lang, a(n) up to 3000
Eric Weisstein's World of Mathematics, Triskaidekaphobia
FORMULA
digitsum(a(n))=13, ordered increasingly.
EXAMPLE
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
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 *)
PROG
(Haskell)
a143164 n = a143164_list !! (n-1)
a143164_list = filter ((== 13) . a007953) [0..]
-- Reinhard Zumkeller, Jul 17 2014
(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]<u[10] || (u[1]<u[10] && u[2]<u[11] && u[3]<u[12] && u[4]<u[13]), my(s=sum(i=1, 13, 10^u[i])); if(s<=lim, listput(v, s))), 1); Set(v) \\ Charles R Greathouse IV, May 30 2019
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).
KEYWORD
nonn,base,easy
AUTHOR
Wolfdieter Lang, Sep 15 2008
STATUS
approved
Numbers whose sum of digits is 12.
+10
32
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,1
COMMENTS
A007953(a(n)) = 12; number of repdigits = #{66,444,3333,222222,1^12} = A242627(12) = 5. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[2000], Total[IntegerDigits[#]]==12&]
PROG
(Magma) [n: n in [1..1000] | &+Intseq(n) eq 12];
(Haskell)
a235151 n = a235151_list !! (n-1)
a235151_list = filter ((== 12) . a007953) [0..]
-- 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).
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Jan 04 2014
STATUS
approved
Numbers whose sum of digits is 16.
+10
32
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,1
COMMENTS
A007953(a(n)) = 16; number of repdigits = #{88,4444,22222222,1^16} = A242627(16) = 4. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[1000], Total[IntegerDigits[#]]==16 &]
PROG
(Magma) [n: n in [1..1000] | &+Intseq(n) eq 16];
(Haskell)
a235227 n = a235227_list !! (n-1)
a235227_list = filter ((== 16) . a007953) [0..]
-- 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).
KEYWORD
base,nonn
AUTHOR
Vincenzo Librandi, Jan 05 2014
STATUS
approved
Numbers whose sum of digits is 18.
+10
32
99, 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, 918, 927, 936, 945, 954, 963
OFFSET
1,1
COMMENTS
A007953(a(n)) = 18; number of repdigits = #{99,666,333333,222222222,1^18} = A242627(18) = 5. - Reinhard Zumkeller, Jul 17 2014
LINKS
FORMULA
a(n) = 9*A279769(n). - M. F. Hasler, Dec 23 2016
MATHEMATICA
Select[Range[1000], Total[IntegerDigits[#]] == 18 &]
PROG
(Magma) [n: n in [1..1000] | &+Intseq(n) eq 18];
(Haskell)
a235228 n = a235228_list !! (n-1)
a235228_list = filter ((== 18) . a007953) [0..]
-- 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), A166459 (19), A235229 (20).
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Jan 05 2014
STATUS
approved
Numbers whose sum of digits is 17.
+10
31
89, 98, 179, 188, 197, 269, 278, 287, 296, 359, 368, 377, 386, 395, 449, 458, 467, 476, 485, 494, 539, 548, 557, 566, 575, 584, 593, 629, 638, 647, 656, 665, 674, 683, 692, 719, 728, 737, 746, 755, 764, 773, 782, 791, 809, 818, 827, 836, 845, 854, 863, 872
OFFSET
1,1
COMMENTS
A007953(a(n)) = 17; number of repdigits = A242627(17) = 1. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[900], Total[IntegerDigits[#]] == 17&] (* Vincenzo Librandi, Mar 07 2013 *)
PROG
(Magma) [n: n in [1..900] | &+Intseq(n) eq 17]; // Vincenzo Librandi, Mar 07 2013
(Haskell)
a166370 n = a166370_list !! (n-1)
a166370_list = filter ((== 17) . a007953) [0..]
-- 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), A235228 (18), A166459 (19), A235229 (20).
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Oct 13 2009
STATUS
approved
Numbers whose sum of digits is 14.
+10
31
59, 68, 77, 86, 95, 149, 158, 167, 176, 185, 194, 239, 248, 257, 266, 275, 284, 293, 329, 338, 347, 356, 365, 374, 383, 392, 419, 428, 437, 446, 455, 464, 473, 482, 491, 509, 518, 527, 536, 545, 554, 563, 572, 581, 590, 608, 617, 626, 635, 644, 653, 662
OFFSET
1,1
COMMENTS
A007953(a(n)) = 14; number of repdigits = #{77,2222222,1^14} = A242627(14) = 3. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[1000], Total[IntegerDigits[#]] == 14 &]
PROG
(Magma) [n: n in [1..1000] | &+Intseq(n) eq 14];
(Haskell)
a235225 n = a235225_list !! (n-1)
a235225_list = filter ((== 14) . a007953) [0..]
-- 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), A235226 (15), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Jan 05 2014
STATUS
approved
Numbers whose sum of digits is 20.
+10
31
299, 389, 398, 479, 488, 497, 569, 578, 587, 596, 659, 668, 677, 686, 695, 749, 758, 767, 776, 785, 794, 839, 848, 857, 866, 875, 884, 893, 929, 938, 947, 956, 965, 974, 983, 992, 1199, 1289, 1298, 1379, 1388, 1397, 1469, 1478, 1487, 1496, 1559, 1568, 1577, 1586
OFFSET
1,1
COMMENTS
A007953(a(n)) = 20; number of repdigits = #{5555,44444,2222222222,1^20} = A242627(20) = 4. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[2000], Total[IntegerDigits[#]]==20&]
PROG
(Magma) [n: n in [1..2000] | &+Intseq(n) eq 20];
(Haskell)
a235229 n = a235229_list !! (n-1)
a235229_list = filter ((== 20) . a007953) [0..]
-- 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), A166459 (19).
KEYWORD
base,nonn
AUTHOR
Vincenzo Librandi, Jan 05 2014
STATUS
approved
Numbers whose sum of digits is 15.
+10
30
69, 78, 87, 96, 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, 690, 708, 717, 726, 735
OFFSET
1,1
COMMENTS
A007953(a(n)) = 15; number of repdigits = #{555,33333,1^15} = A242627(15) = 3. - Reinhard Zumkeller, Jul 17 2014
LINKS
MATHEMATICA
Select[Range[1000], Total[IntegerDigits[#]] == 15 &]
PROG
(Magma) [n: n in [1..1000] | &+Intseq(n) eq 15];
(Haskell)
a235226 n = a235226_list !! (n-1)
a235226_list = filter ((== 15) . a007953) [0..]
-- 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), A235227 (16), A166370 (17), A235228 (18), A166459 (19), A235229 (20).
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Jan 05 2014
STATUS
approved

Search completed in 0.035 seconds