|
|
A000042
|
|
Unary representation of natural numbers.
(Formerly M4804)
|
|
97
|
|
|
1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111, 11111111111, 111111111111, 1111111111111, 11111111111111, 111111111111111, 1111111111111111, 11111111111111111, 111111111111111111, 1111111111111111111, 11111111111111111111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Or, numbers written in base 1.
If p is a prime > 5 then d_{a(p)} == 1 (mod p) where d_{a(p)} is a divisor of a(p). This also gives an alternate elementary proof of the infinitude of prime numbers by the fact that for every prime p there exists at least one prime of the form k*p + 1. - Amarnath Murthy, Oct 05 2002
11 = 1*9 + 2; 111 = 12*9 + 3; 1111 = 123*9 + 4; 11111 = 1234*9 + 5; 111111 = 12345*9 + 6; 1111111 = 123456*9 + 7; 11111111 = 1234567*9 + 8; 111111111 = 12345678*9 + 9. - Vincenzo Librandi, Jul 18 2010
|
|
REFERENCES
|
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.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (10^n - 1)/9.
G.f.: 1/((1-x)*(1-10*x)).
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(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
a(n+m-2) = a(m)*a(n-1) - (a(m)-1)*a(n-2), n>1, m>0. - Matej Veselovac, Jun 07 2021
|
|
MAPLE
|
a:= n-> parse(cat(1$n)):
|
|
MATHEMATICA
|
Table[(10^n - 1)/9, {n, 1, 18}]
FromDigits/@Table[PadLeft[{}, n, 1], {n, 20}] (* Harvey P. Dale, Aug 21 2011 *)
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, (10^n-1)/9)
(Sage) [gaussian_binomial(n, 1, 10) for n in range(1, 19)] # Zerinvary Lajos, May 28 2009
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|