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
KEYWORD
nonn,base
AUTHOR
Steven Lu, Mar 02 2022
EXTENSIONS
a(24)-a(25) from Michael S. Branicky, Mar 02 2022
STATUS
approved