This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A143164 Numbers with digitsum 13, in increasing order. 32
 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 (list; graph; refs; listen; history; text; internal format)
 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 David A. Corneth, Table of n, a(n) for n = 1..10000 Wolfdieter Lang, a(n) up to 3000 Eric Weisstein's World of Mathematics, Triskaidekaphobia Wikipedia, 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 MAPLE select(n->convert(convert(n, base, 10), `+`)=13, [\$1..652]); # Paolo P. Lava, Jul 05 2019 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]

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 22 19:53 EDT 2019. Contains 328319 sequences. (Running on oeis4.)