A119033 Triangular numbers composed of digits {0,1,2}.
1, 10, 21, 120, 210, 2211, 10011, 20100, 112101, 222111, 2001000, 22221111, 110120220, 122000010, 200010000, 1210000221, 2222211111, 12001110201, 20000100000, 122021211021, 222222111111, 2000001000000, 12201101000011, 22222221111111, 200000010000000
Offset: 1
Links
- Giovanni Resta, Tridigital Triangular Numbers.
Crossrefs
Programs
-
Magma
[t: n in [1..2*10^7] | Set(Intseq(t)) subset {0,1,2} where t is n*(n+1) div 2]; // Vincenzo Librandi, Dec 18 2015
-
Mathematica
Rest[Select[FromDigits/@Tuples[{0, 1, 2}, 10], IntegerQ[(Sqrt[8 # + 1] - 1)/2] &]] (* Vincenzo Librandi, Dec 18 2015 *)
-
PARI
isok(n) = ispolygonal(n, 3) && (vecmax(digits(n)) <= 2); \\ Michel Marcus, Dec 18 2015
Formula
Extensions
a(24)-a(25) from Vincenzo Librandi, Dec 18 2015
Comments