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.

A226772 Triangular numbers obtained as the concatenation of n and 2n.

This page as a plain text file.
%I A226772 #33 Nov 09 2020 21:33:42
%S A226772 36,1326,2346,3570,125250,223446,12502500,22234446,1250025000,
%T A226772 2066441328,2222344446,2383847676,3673573470,125000250000,
%U A226772 222223444446,5794481158896,12500002500000,12857132571426,22222234444446,49293309858660,804878916097578,933618918672378,971908519438170
%N A226772 Triangular numbers obtained as the concatenation of n and 2n.
%C A226772 Includes 125*10^(2*k+1)+25*10^k and (10^k+2)*(1+(10^k-1)*2/9) for k >= 1. - _Robert Israel_, Nov 09 2020
%H A226772 Robert Israel, <a href="/A226772/b226772.txt">Table of n, a(n) for n = 1..1509</a>
%e A226772 If n=23, 2n=46, n//2n = 2346 = 68*69/2, a triangular number.
%p A226772 F:= proc(d) local D,R,M,m,w,x,x1,x2;
%p A226772    R:= NULL;
%p A226772    M:= 10^d/2+1;
%p A226772    D:= numtheory:-divisors(M);
%p A226772    for m in D do if igcd(m,M/m)=1 then
%p A226772      for w in [chrem([-1,1],[8*m,M/m]), chrem([1,-1],[8*m,M/m])] do
%p A226772      x:= (w^2-1)/8;
%p A226772      x1:= x mod 10^d;
%p A226772      x2:= floor(x/10^d);
%p A226772      if x1 = 2*x2 and x1 >= 10^(d-1) then R:= R, x fi
%p A226772    od fi od;
%p A226772    op(sort([R]))
%p A226772 end proc:
%p A226772 36, seq(F(d),d=2..10); # _Robert Israel_, Nov 09 2020
%t A226772 TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; t = {}; Do[s = FromDigits[Join[IntegerDigits[n], IntegerDigits[2*n]]]; If[TriangularQ[s], AppendTo[t, s]], {n, 100000}]; t (* _T. D. Noe_, Jun 18 2013 *)
%o A226772 (PARI)
%o A226772 concatint(a,b)=eval(concat(Str(a),Str(b)))
%o A226772 istriang(x)=issquare(8*x+1)
%o A226772 {for(n=1,10^5,a=concatint(n,2*n);if(istriang(a),print(a)))}
%Y A226772 Cf. A003098, A068899, A226742, A226788, A226789.
%K A226772 nonn,base
%O A226772 1,1
%A A226772 _Antonio Roldán_, Jun 18 2013