A000042 Unary representation of natural numbers.
1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11111111111, 111111111111, 1111111111111, 11111111111111, 111111111111111, 1111111111111111, 11111111111111111, 111111111111111111, 1111111111111111111, 11111111111111111111
Offset: 1
References
- Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See pp. 57-58.
- K. G. Kroeber, Mathematik der Palindrome; p. 348; 2003; ISBN 3 499 615762; Rowohlt Verlag; Germany.
- D. Olivastro, Ancient Puzzles. Bantam Books, NY, 1993, p. 276.
- Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 32.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- David Wasserman, Table of n, a(n) for n = 1..1000
- Makoto Kamada, Factorizations of 11...11 (Repunit).
- Amarnath Murthy, On the divisors of Smarandache Unary Sequence. Smarandache Notions Journal, Vol. 11, No. 1-2-3, Spring 2000, page 184.
- Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 2.12.
- Index entries for linear recurrences with constant coefficients, signature (11,-10).
- Index to divisibility sequences
Crossrefs
Programs
-
Haskell
A000042 n = (10^n-1) `div` 9 -- James Spahlinger, Oct 08 2012 (Common Lisp) (defun a000042 (n) (truncate (expt 10 n) 9)) ; James Spahlinger, Oct 12 2012
-
Magma
[(10^n - 1)/9: n in [1..20]]; // G. C. Greubel, Nov 04 2018
-
Maple
a:= n-> parse(cat(1$n)): seq(a(n), n=1..25); # Alois P. Heinz, Mar 23 2018
-
Mathematica
Table[(10^n - 1)/9, {n, 1, 18}] FromDigits/@Table[PadLeft[{},n,1],{n,20}] (* Harvey P. Dale, Aug 21 2011 *)
-
PARI
a(n)=if(n<0,0,(10^n-1)/9)
-
Python
def a(n): return int("1"*n) # Michael S. Branicky, Jan 01 2021
-
Sage
[gaussian_binomial(n, 1, 10) for n in range(1, 19)] # Zerinvary Lajos, May 28 2009
Formula
a(n) = (10^n - 1)/9.
G.f.: 1/((1-x)*(1-10*x)).
Binomial transform of A003952. - Paul Barry, Jan 29 2004
From Paul Barry, Aug 24 2004: (Start)
a(n) = 10*a(n-1) + 1, n > 1, a(1)=1. [Offset 1.]
a(n) = Sum_{k=0..n} binomial(n+1, k+1)*9^k. [Offset 0.] (End)
a(2n) - 2*a(n) = (3*a(n))^2. - Amarnath Murthy, Jul 21 2003
a(n) is the binary representation of the n-th Mersenne number (A000225). - Ross La Haye, Sep 13 2003
The Hankel transform of this sequence is [1,-10,0,0,0,0,0,0,0,0,...]. - Philippe Deléham, Nov 21 2007
E.g.f.: (exp(10*x) - exp(x))/9. - G. C. Greubel, Nov 04 2018
a(n) = 11*a(n-1) - 10*a(n-2). - Wesley Ivan Hurt, May 28 2021
a(n+m-2) = a(m)*a(n-1) - (a(m)-1)*a(n-2), n>1, m>0. - Matej Veselovac, Jun 07 2021
Sum_{n>=1} 1/a(n) = A065444. - Stefano Spezia, Jul 30 2024
Extensions
More terms from Paul Barry, Jan 29 2004
Comments