OFFSET
1,1
COMMENTS
The k-th triangular number T(k) = k*(k+1)/2.
The lesser member of each twin-prime pair appears in this sequence. Hence, A001359 is a subset of this sequence.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
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.
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
MAPLE
T:= seq(numtheory:-tau(n*(n+1)/2), n=1..1000):
select(t -> T[t]=T[t+1], [$1..999]); # Robert Israel, Apr 09 2017
MATHEMATICA
Select[Range[1000], DivisorSigma[0, #*(# + 1)/2] == DivisorSigma[0, (# + 1)*(# + 1 + 1)/2] &]
SequencePosition[DivisorSigma[0, #]&/@Accumulate[Range[300]], {x_, x_}][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 02 2018 *)
PROG
(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
(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
(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
(Python)
from sympy import divisor_count
for n in range(1, 20):
if divisor_count(n*(n+1)/2)==divisor_count((n+1)*(n+2)/2):
print(n, end=', ') # Stefano Spezia, Dec 06 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 09 2017
STATUS
approved