cp's OEIS Frontend

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.

A226742 Triangular numbers obtained as the concatenation of 2*k and k.

This page as a plain text file.
%I A226742 #24 Feb 06 2025 12:38:08
%S A226742 21,105,2211,9045,222111,306153,742371,890445,1050525,22221111,
%T A226742 88904445,107905395,173808690,2222211111,8889044445,12141260706,
%U A226742 15754278771,222222111111,888890444445,22222221111111,36734701836735,65306123265306
%N A226742 Triangular numbers obtained as the concatenation of 2*k and k.
%C A226742 Includes (2*10^k+1)*(10^k-1)/9 and (2*10^k+1)*(4*10^k+5)/9 for k >= 1. - _Robert Israel_, Feb 06 2025
%H A226742 Robert Israel, <a href="/A226742/b226742.txt">Table of n, a(n) for n = 1..2675</a>
%e A226742 If k=111, 2k=222, 2k//k = 222111 = 666*667/2, a triangular number.
%p A226742 g:= proc(d) local a, b, n, Res, x, y;
%p A226742       Res:= NULL:
%p A226742       for a in numtheory:-divisors(2*(2*10^d+1)) do
%p A226742         b:= 2*(2*10^d+1)/a;
%p A226742         if igcd(a, b)>1 then next fi;
%p A226742         n:= chrem([0, -1], [a, b]);
%p A226742         x:= n*(n+1)/2;
%p A226742         y:= x/(2*10^d+1);
%p A226742         if y < 10^(d-1) or y >= 10^d  then next fi;
%p A226742         Res:= Res, (2*10^d+1)*y
%p A226742       od;
%p A226742       op(sort([Res]))
%p A226742 end proc:
%p A226742 map(g, [$1..10]); # _Robert Israel_, Feb 06 2025
%t A226742 TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; t = {}; Do[s = FromDigits[Join[IntegerDigits[2*n], IntegerDigits[n]]]; If[TriangularQ[s], AppendTo[t, s]], {n, 100000}]; t (* _T. D. Noe_, Jun 18 2013 *)
%o A226742 (PARI)
%o A226742 concatint(a,b)=eval(concat(Str(a),Str(b)))
%o A226742 istriang(x)=issquare(8*x+1)
%o A226742 {for(n=1,10^5,a=concatint(2*n,n);if(istriang(a),print(a)))}
%Y A226742 Cf. A003098, A068899, A226772, A226788, A226789, A380792.
%K A226742 nonn,base
%O A226742 1,1
%A A226742 _Antonio Roldán_, Jun 18 2013