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.

A160717 Cyclops triangular numbers.

This page as a plain text file.
%I A160717 #18 Nov 05 2024 18:05:11
%S A160717 0,105,406,703,903,11026,13041,14028,15051,27028,36046,41041,43071,
%T A160717 46056,61075,66066,75078,77028,83028,85078,93096,1110795,1130256,
%U A160717 1160526,1180416,1250571,1290421,1330896,1350546,1360425,1380291
%N A160717 Cyclops triangular numbers.
%C A160717 Triangular numbers (A000217) that are also cyclops numbers (A134808).
%H A160717 Kenny Lau, <a href="/A160717/b160717.txt">Table of n, a(n) for n = 1..20001</a>
%e A160717 105 is in the sequence since it is both a triangular number (105 = 1 + 2 + ... + 14) and a Cyclops number (number of digits is odd, and the only zero is the middle digit). - _Michael B. Porter_, Jul 08 2016
%p A160717 count:= 1: A[1]:= 0:
%p A160717 for d from 1 to 3 do
%p A160717   for x from 0 to 9^d-1 do
%p A160717     L:= convert(x+9^d,base,9);
%p A160717     X:= add((L[i]+1)*10^(i-1),i=1..d);
%p A160717     for y from 0 to 9^d-1 do
%p A160717       L:= convert(y+9^d,base,9);
%p A160717       Y:= add((L[i]+1)*10^(i-1),i=1..d);
%p A160717       Z:= Y + 10^(d+1)*X;
%p A160717       if issqr(1+8*Z) then
%p A160717         count:= count+1;
%p A160717         A[count]:= Z;
%p A160717       fi
%p A160717 od od od:
%p A160717 seq(A[i],i=1..count); # _Robert Israel_, Jul 08 2016
%t A160717 cyclopsQ[n_] := Block[{id=IntegerDigits@n,lg=Floor[Log[10,n]+1]}, Count[id,0]==1 && OddQ@lg && id[[(lg+1)/2]]==0]; lst = {0}; Do[t = n (n + 1)/2; If[ cyclopsQ@t, AppendTo[lst, t]], {n, 0, 1670}]; lst (* _Robert G. Wilson v_, Jun 09 2009 *)
%t A160717 cyclpsQ[n_]:=With[{len=IntegerLength[n]},OddQ[len]&&DigitCount[n,10,0]==1&&IntegerDigits[n][[(len+1)/2]]==0]; Join[{0},Select[ Accumulate[ Range[2000]],cyclpsQ]] (* _Harvey P. Dale_, Nov 05 2024 *)
%Y A160717 Cf. A000217, A134808, A134809, A138131, A138148, A153806, A160711, A160712.
%K A160717 base,easy,nonn
%O A160717 1,2
%A A160717 _Omar E. Pol_, Jun 08 2009
%E A160717 More terms from _Robert G. Wilson v_, Jun 09 2009
%E A160717 Offset and b-file changed by _N. J. A. Sloane_, Jul 27 2016