%I #26 May 25 2023 13:10:27
%S 8,110888,149768,1119363,1172888,2676495,3143528,4782968,5895183,
%T 8596623,9168783,15896168,19114383,28174863,48052623,50523663,
%U 58186383,72641528,82664463,98168463,113465103,139523343,178810383,208860303,223681935,230675343,248755983,249260943
%N Numbers m such that tau(m) = tau(m + 1) + 1 = tau(m + 2), where tau(k) = the number of divisors of k (A000005).
%C Corresponding values of tau(a(n)): 4, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, ...
%C Triplets of [tau(a(n)), tau(a(n) + 1), tau(a(n) + 2)] = [tau(a(n)), tau(a(n)) - 1, tau(a(n))]: [4, 3, 4], [16, 15, 16], [16, 15, 16], [16, 15, 16], [16, 15, 16], [16, 15, 16], [16, 15, 16], [16, 15, 16], [16, 15, 16], ...
%C a(n) is one less than a perfect square. - _David A. Corneth_, Dec 29 2020
%H David A. Corneth, <a href="/A339777/b339777.txt">Table of n, a(n) for n = 1..10000</a>
%e tau(8) = 4, tau(9) = 3, tau(10) = 4.
%t d1 = 1; d2 = 2; s = {}; Do[d3 = DivisorSigma[0, n]; If[Equal @@ {d1, d2 + 1, d3}, AppendTo[s, n - 2]]; d1 = d2; d2 = d3, {n, 3, 10^7}]; s (* _Amiram Eldar_, Dec 17 2020 *)
%t Position[Partition[DivisorSigma[0,Range[59*10^5]],3,1],_?(#[[1]]==#[[2]]+1==#[[3]]&),1,Heads->False]//Flatten (* _Harvey P. Dale_, May 25 2023 *)
%o (Magma) [m: m in [2..10^6] | #Divisors(m + 1) + 1 eq #Divisors(m) and #Divisors(m + 2) eq #Divisors(m)]
%o (PARI) isok(m) = my(nb = numdiv(m)); (numdiv(m+2) == nb) && (numdiv(m+1) == nb-1); \\ _Michel Marcus_, Dec 18 2020
%Y Cf. A000005, A339776.
%Y Subsequence of A005563.
%Y Intersection of A062832 and A068208.
%K nonn
%O 1,1
%A _Jaroslav Krizek_, Dec 16 2020
%E More terms from _Amiram Eldar_, Dec 16 2020