This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A119160 #27 Apr 06 2023 20:07:56 %S A119160 6,66,666,426426,266262426,22464262666,46624464466426, %T A119160 644644226644644222426,46424226426466426446424262644446, %U A119160 626644642222466644646226466422666 %N A119160 Triangular numbers composed of digits {2,4,6}. %C A119160 All terms end in 6. - _Robert Israel_, Feb 05 2016 %C A119160 a(11) > 10^40. - _Tyler Busby_, Mar 29 2023 %H A119160 Giovanni Resta, <a href="http://www.numbersaplenty.com/tr/tr246.html">Tridigital Triangular Numbers</a>. %F A119160 a(n) = A000217(A119161(n)). - _Tyler Busby_, Mar 29 2023 %p A119160 F:= proc(d) # get all terms with d digits %p A119160 local res, m, prefs,i,t,qmax,qmin,smax,smin,cand,s; %p A119160 res:= NULL; %p A119160 m:= max(1,floor(d/2-1)); %p A119160 prefs:= [2,4,6]*10^(d-1); %p A119160 for i from 1 to m-1 do %p A119160 prefs:= map(t -> (t + 2*10^(d-1-i),t+4*10^(d-1-i),t+6*10^(d-1-i)), prefs) %p A119160 od; %p A119160 for t in prefs do %p A119160 qmax:= t + 6*(10^(d-m)-1)/9; smax:= floor(sqrt(8*qmax+1)); %p A119160 qmin:= t + 2*(10^(d-m)-1)/9; smin:= ceil(sqrt(8*qmin+1)); %p A119160 smin:= smin + 1 - (smin mod 2); %p A119160 for s from smin to smax by 2 do %p A119160 cand:= (s^2 -1)/8; %p A119160 if cand mod 10 = 6 and convert(convert(cand,base,10),set) subset {2,4,6} then %p A119160 res:= res, cand; %p A119160 fi %p A119160 od %p A119160 od; %p A119160 res; %p A119160 end proc: %p A119160 seq(F(d),d=1..21); # _Robert Israel_, Feb 05 2016 %t A119160 Select[#*(# + 1)/2 & /@ %t A119160 Range[1000000], ! %t A119160 MemberQ[IntegerDigits[#], 0 | 1 | 3 | 5 | 7 | 8 | 9] &] (*_Julien Kluge_, Feb 01 2016*) %o A119160 (Magma) [t: n in [1..2*10^7] | Set(Intseq(t)) subset {2, 4, 6} where t is n*(n+1) div 2]; // _Vincenzo Librandi_, Feb 04 2016 %Y A119160 Cf. A000217, A053923, A119161. See A119033 for a table of cross-references. %K A119160 nonn,base,more %O A119160 1,1 %A A119160 _Giovanni Resta_, May 10 2006 %E A119160 a(10) from _Max Alekseyev_, Jun 16 2011