login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052216 Sum of two powers of 10. 45
2, 11, 20, 101, 110, 200, 1001, 1010, 1100, 2000, 10001, 10010, 10100, 11000, 20000, 100001, 100010, 100100, 101000, 110000, 200000, 1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000, 10000001, 10000010, 10000100, 10001000, 10010000, 10100000 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Numbers n such that sum of digits is 2.

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

a(n) = 3*A237424(n) - 1. - Reinhard Zumkeller, Jan 28 2015

LINKS

Vincenzo Librandi, T. D. Noe and R. Zumkeller, Table of n, a(n) for n = 1..10000 (first 48 terms from V. Librandi, up to 1036 from T. D. Noe)

FORMULA

Sum of two powers of 10: a(n) = 10^n + 10^m for n >= 0, m = 0..n.

EXAMPLE

The triangular array starts (see formula):

2,

11, 20,

101, 110, 200,

1001, 1010, 1100, 2000,

10001, 10010, 10100, 11000, 20000,

100001, 100010, 100100, 101000, 110000, 200000,

1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000, etc.

- Bruno Berselli, Mar 07 2013

MATHEMATICA

t = 10^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)

With[{nn=7}, Sort[Join[Table[FromDigits[PadRight[{2}, n, 0]], {n, nn}], FromDigits/@Flatten[Table[Table[Insert[PadRight[{1}, n, 0], 1, i]], {n, nn}, {i, 2, n+1}], 1]]]] (* Harvey P. Dale, Nov 15 2011 *)

Select[Range[10^9], Total[IntegerDigits[#]] == 2&] (* Vincenzo Librandi, Mar 07 2013 *)

PROG

(MAGMA) [n: n in [1..10100000] | &+Intseq(n) eq 2]; // Vincenzo Librandi, Mar 07 2013

(MAGMA) /* As a triangular array: */ [[10^n+10^m: m in [0..n]]: n in [0..8]]; // Bruno Berselli, Mar 07 2013

(Haskell)

a052216 n = a052216_list !! (n-1)

a052216_list = 2 : f [2] 9 where

   f xs@(x:_) z = ys ++ f ys (10 * z) where

                  ys = (x + z) : map (* 10) xs

-- Reinhard Zumkeller, Jan 28 2015, Jul 17 2014

(PARI) a(n)=my(d=(sqrtint(8*n)-1)\2, t=n-d*(d+1)/2-1); 10^d + 10^t \\ Charles R Greathouse IV, Dec 19 2016

CROSSREFS

Subsequence of A069263 and A107679. A038444 is a subsequence.

Sums of n powers of 10: A011557 (1), 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), A235229 (20).

Cf. A007953, A242614, A242627, A237424.

Sequence in context: A064975 A115095 A061907 * A094629 A081242 A071762

Adjacent sequences:  A052213 A052214 A052215 * A052217 A052218 A052219

KEYWORD

easy,nonn,tabl

AUTHOR

Henry Bottomley, Feb 01 2000

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified March 29 13:11 EDT 2017. Contains 284270 sequences.