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 A276542 #35 Sep 08 2022 08:46:17 %S A276542 3,4,5,11,17,28,29,33,41,42,52,55,59,66,68,71,76,85,88,91,93,101,107, %T A276542 114,123,137,141,143,149,150,159,170,172,179,183,185,186,188,191,196, %U A276542 197,201,203,208,213,215,217,219,227,232,235,236,239,243,244,247,265 %N A276542 Numbers k such that the k-th and (k+1)st triangular numbers have the same number of divisors. %C A276542 The k-th triangular number T(k) = k*(k+1)/2. %C A276542 The lesser member of each twin-prime pair appears in this sequence. Hence, A001359 is a subset of this sequence. %H A276542 Harvey P. Dale, <a href="/A276542/b276542.txt">Table of n, a(n) for n = 1..1000</a> %e A276542 a(3) = 5; T(5) = 5*(5+1)/2 = 15; T(5+1) = 6*(6+1)/2 = 21; 15 and 21 have 4 divisors each. %e A276542 a(6) = 28; T(28) = 28*(28+1)/2 = 406; T(28+1) = 29*(29+1)/2 = 435; 406 and 435 have 8 divisors each %p A276542 T:= seq(numtheory:-tau(n*(n+1)/2), n=1..1000): %p A276542 select(t -> T[t]=T[t+1], [$1..999]); # _Robert Israel_, Apr 09 2017 %t A276542 Select[Range[1000], DivisorSigma[0, #*(# + 1)/2] == DivisorSigma[0, (# + 1)*(# + 1 + 1)/2] &] %t A276542 SequencePosition[DivisorSigma[0,#]&/@Accumulate[Range[300]],{x_,x_}][[All, 1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 02 2018 *) %o A276542 (PARI) k=[]; for(n=1, 1000, a=numdiv(n*(n+1)/2); b=numdiv((n+1)*(n+1+1)/2); if(a==b, k=concat(k, n))); k %o A276542 (GAP) T:=List([1..270],n->n*(n+1)/2);; a:=Filtered([1..Length(T)-1],i->Tau(T[i])=Tau(T[i+1])); # _Muniru A Asiru_, Dec 06 2018 %o A276542 (Magma) [n: n in [1..300] | DivisorSigma(0, n*(n + 1) div 2) eq DivisorSigma(0, (n + 1)*(n + 1 + 1) div 2)]; // _Vincenzo Librandi_, Dec 06 2018 %o A276542 (Python) %o A276542 from sympy import divisor_count %o A276542 for n in range(1,20): %o A276542 if divisor_count(n*(n+1)/2)==divisor_count((n+1)*(n+2)/2): %o A276542 print(n, end=', ') # _Stefano Spezia_, Dec 06 2018 %Y A276542 Cf. A000040, A000217, A001359, A062832. %Y A276542 Cf. A319035 (the corresponding triangular numbers). %K A276542 nonn %O A276542 1,1 %A A276542 _K. D. Bajpai_, Apr 09 2017