login
A352057
Triangular numbers whose nonzero digits are all the same.
1
0, 1, 3, 6, 10, 55, 66, 300, 666, 990, 3003, 5050, 10011, 66066, 500500, 600060, 50005000, 5000050000, 500000500000, 50000005000000, 5000000050000000, 500000000500000000, 50000000005000000000, 5000000000050000000000, 500000000000500000000000, 50000000000005000000000000
OFFSET
1,3
COMMENTS
This sequence may correspond to "monochromatic step squads" in the British animation "Numberblocks".
Conjecture: the largest term in this sequence whose nonzero digits are not 5 is 600060.
MATHEMATICA
(* Method1 *)
NonZeroQ[n_Integer] := n != 0; Select[
Table[n (n + 1)/2, {n, 0, 1000000}],
Length[Tally[Select[IntegerDigits[#], NonZeroQ]]] == 1 &]
(* Method2 *)
Sort[Select[
Flatten[Outer[Times,
Table[FromDigits[IntegerDigits[n, 2]], {n, 2^16 - 1}], Range[9]]],
IntegerQ[Sqrt[8 # + 1]] &]]
PROG
(Python)
from sympy import integer_nthroot
from sympy.utilities.iterables import multiset_permutations
def istri(n): return integer_nthroot(8*n+1, 2)[1]
def zplus1(digits):
if digits == 1: yield 0
for d1 in "123456789":
digset = "0"*(digits-1) + d1*(digits-1)
for mp in multiset_permutations(digset, digits-1):
t = int(d1 + "".join(mp))
yield t
def afind(maxdigits):
for digits in range(1, maxdigits+1):
for t in zplus1(digits):
if istri(t):
print(t, end=", ")
afind(22) # Michael S. Branicky, Mar 02 2022
(PARI) isok(k) = my(d=digits(k*(k+1)/2)); d = select(x->(x!=0), d); #Set(d)<=1;
lista(nn) = {for (n=0, nn, if (isok(n), print1(n*(n+1)/2, ", ")); ); } \\ Michel Marcus, Mar 02 2022
CROSSREFS
Supersequence of A037156.
Cf. A352148 (indices of these triangular numbers).
Sequence in context: A061455 A068071 A067269 * A343811 A071299 A338767
KEYWORD
nonn,base
AUTHOR
Steven Lu, Mar 02 2022
EXTENSIONS
a(24)-a(25) from Michael S. Branicky, Mar 02 2022
STATUS
approved