VOOZH
about
URL: https://oeis.org/A266959
⇱ A266959 - OEIS
login
A266959
Smallest n-digit number ending in n.
2
1, 12, 103, 1004, 10005, 100006, 1000007, 10000008, 100000009, 1000000010, 10000000011, 100000000012, 1000000000013, 10000000000014, 100000000000015, 1000000000000016, 10000000000000017, 100000000000000018, 1000000000000000019, 10000000000000000020
(
list
;
graph
;
refs
;
listen
;
history
;
text
;
internal format
)
OFFSET
1,2
COMMENTS
Digital sum of a(n) = digsum(n) + 1 for n>1.
3, 229, 4987 are the initial values of n for prime a(n). -
Altug Alkan
, Jan 17 2016
LINKS
Colin Barker,
Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients
, signature (12,-21,10).
FORMULA
a(n) = n + 10^(n-1) for n>1 with a(1) = 1.
a(n) =
A081552
(n) - 1 for n>1. -
Michel Marcus
, Jan 10 2016
From
Colin Barker
, Jan 10 2016: (Start)
a(n) = 12*a(n-1) - 21*a(n-2) + 10*a(n-3) for n>3.
G.f.: x*(1-20*x^2+10*x^3) / ((1-x)^2*(1-10*x)). (End)
EXAMPLE
a(4) = 1004 because it is the smallest 4-digit number ending in 4.
MAPLE
A266959
:=n->n+10^(n-1): 1, seq(
A266959
(n), n=2..30);
MATHEMATICA
Join[{1}, Table[n + 10^(n - 1), {n, 2, 20}]]
PROG
(Magma) [1] cat [n+10^(n-1): n in [2..30]]; //
Vincenzo Librandi
, Jan 10 2016
(PARI) Vec(x*(1-20*x^2+10*x^3)/((1-x)^2*(1-10*x)) + O(x^30)) \\
Colin Barker
, Jan 10 2016
(PARI) a(n) = if(n==1, 1, n + 10^(n-1)); \\
Altug Alkan
, Jan 17 2016
(Python)
def
A266959
(n): return n+10**(n-1) if n > 1 else 1 #
Chai Wah Wu
, Jul 25 2022
CROSSREFS
Cf.
A007953
(digsum),
A081552
,
A279913
.
Sequence in context:
A264452
A078397
A228988
*
A262778
A099293
A024454
Adjacent sequences:
A266956
A266957
A266958
*
A266960
A266961
A266962
KEYWORD
nonn
,
easy
,
base
AUTHOR
Wesley Ivan Hurt
, Jan 09 2016
STATUS
approved