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.

A052222 Numbers whose sum of digits is 8.

This page as a plain text file.
%I A052222 #19 Sep 08 2022 08:44:59
%S A052222 8,17,26,35,44,53,62,71,80,107,116,125,134,143,152,161,170,206,215,
%T A052222 224,233,242,251,260,305,314,323,332,341,350,404,413,422,431,440,503,
%U A052222 512,521,530,602,611,620,701,710,800,1007,1016,1025,1034,1043,1052,1061
%N A052222 Numbers whose sum of digits is 8.
%C A052222 A007953(a(n)) = 8; number of repdigits = #{8,44,2222,1^8} = A242627(8) = 4. - _Reinhard Zumkeller_, Jul 17 2014
%H A052222 Michael S. Branicky, <a href="/A052222/b052222.txt">Table of n, a(n) for n = 1..12870</a> (all terms <= 9 digits; terms 1..1000 from Vincenzo Librandi)
%t A052222 Select[Range[1500], Total[IntegerDigits[#]] == 8 &] (* _Vincenzo Librandi_, Mar 08 2013 *)
%o A052222 (Magma) [n: n in [1..1500] | &+Intseq(n) eq 8 ]; // _Vincenzo Librandi_, Mar 08 2013
%o A052222 (Haskell)
%o A052222 a052222 n = a052222_list !! (n-1)
%o A052222 a052222_list = filter ((== 8) . a007953) [0..]
%o A052222 -- _Reinhard Zumkeller_, Jul 17 2014
%o A052222 (Python)
%o A052222 from sympy.utilities.iterables import multiset_permutations
%o A052222 def auptodigs(maxdigits):
%o A052222     alst = []
%o A052222     for d in range(1, maxdigits+1):
%o A052222         digset = "0"*(d-1) + "11111111222233445678"
%o A052222         for p in multiset_permutations(digset, d):
%o A052222             if p[0] != '0' and sum(map(int, p)) == 8:
%o A052222                 alst.append(int("".join(p)))
%o A052222     return alst
%o A052222 print(auptodigs(4)) # _Michael S. Branicky_, Aug 17 2021
%Y A052222 Cf. A007953.
%Y A052222 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).
%Y A052222 Cf. A242614, A242627.
%K A052222 nonn,base,easy
%O A052222 1,1
%A A052222 _Henry Bottomley_, Feb 01 2000
%E A052222 Offset changed from _Bruno Berselli_, Mar 07 2013