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.

A068127 Triangular numbers with sum of digits = 3.

This page as a plain text file.
%I A068127 #30 May 19 2022 09:22:13
%S A068127 3,21,120,210,300,10011,20100,2001000,200010000,20000100000,
%T A068127 2000001000000,200000010000000,20000000100000000,2000000001000000000,
%U A068127 200000000010000000000,20000000000100000000000,2000000000001000000000000,200000000000010000000000000,20000000000000100000000000000
%N A068127 Triangular numbers with sum of digits = 3.
%C A068127 The sequence is unbounded, as the (2*10^k)-th triangular number is a term.
%H A068127 Michael S. Branicky, <a href="/A068127/b068127.txt">Table of n, a(n) for n = 1..504</a>
%t A068127 t = {}; Do[tri = n*(n+1)/2; If[Total[IntegerDigits[tri, 10]] == 3, AppendTo[t, tri]], {n, 1000000}]; t (* _T. D. Noe_, Jun 05 2012 *)
%t A068127 Select[Accumulate[Range[2*10^6]],Total[IntegerDigits[#]]==3&] (* _Harvey P. Dale_, Jun 22 2021 *)
%t A068127 Sort @ Select[Plus @@@ (10^Select[Tuples[Range[0, 29], 3], Min[Differences[#]] >= 0 &]), IntegerQ[Sqrt[8*# + 1]] &] (* _Amiram Eldar_, May 19 2022 *)
%o A068127 (Python)
%o A068127 from math import isqrt
%o A068127 from itertools import count, islice
%o A068127 def istri(n): return (lambda x: x == isqrt(x)**2)(8*n+1)
%o A068127 def agen(): yield from filter(istri, (10**i + 10**j + 10**k for i in count(0) for j in range(i+1) for k in range(j+1)))
%o A068127 print(list(islice(agen(), 20))) # _Michael S. Branicky_, May 14 2022
%Y A068127 Cf. A000217, A004157, A052217.
%K A068127 base,easy,nonn
%O A068127 1,1
%A A068127 _Amarnath Murthy_, Feb 21 2002
%E A068127 More terms from _Sascha Kurz_, Mar 06 2002
%E A068127 One additional term (a(12)) from _Harvey P. Dale_, May 14 2022
%E A068127 More terms and offset changed to 1 from _Michael S. Branicky_, May 14 2022