OFFSET
0,3
COMMENTS
Integers n such that A043540(n)=1. - Michel Marcus, Aug 19 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1200
Eric Weisstein's World of Mathematics, Repdigit
FORMULA
From Chai Wah Wu, May 30 2016: (Start)
a(n) = 14*a(n-12) - 13*a(n-24) for n > 23.
G.f.: x*(12*x^11 + 11*x^10 + 10*x^9 + 9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(13*x^24 - 14*x^12 + 1). (End)
a(n) = (n - 12*floor((n-1)/12))*(13^floor((n+11)/12) - 1)/12. - Ilya Gutkovskiy, May 30 2016
MATHEMATICA
Union[Flatten[Table[FromDigits[PadRight[{}, n, d], 13], {n, 0, 50}, {d, 12}]]] (* Vincenzo Librandi, Feb 06 2014 *)
PROG
(PARI) isok(n) = !n || (#vecsort(digits(n, 13), , 8) == 1) \\ Michel Marcus, Aug 19 2015
(Python)
A048337_list = [0] + [int(d*l, 13) for l in range(1, 10) for d in '123456789abc'] # Chai Wah Wu, May 30 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Feb 15 1999
STATUS
approved