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 A343018 #30 Jan 03 2025 11:47:34 %S A343018 2,1,5,49,11,35,23,399,47,1849,59,143,119,1599,167,575,179,1295,239, %T A343018 4355,629,2303,359,899,959,9215,1007,39999,719,20735,839,5183,1799, %U A343018 46655,1259,36863,1679,7055,3023,986049,2879,3599,6479,82943,2519,193599,3359,207935 %N A343018 a(n) is the smallest number m such that tau(m+1) = tau(m) + n. %C A343018 tau(m) = the number of divisors of m (A000005). %C A343018 Sequences of numbers m such that tau(m+1) = tau(m) + n for 0 <= n <= 5: %C A343018 n = 0: 2, 14, 21, 26, 33, 34, 38, 44, 57, 75, 85, 86, 93, ... (A005237). %C A343018 n = 1: 1, 3, 9, 15, 25, 63, 121, 195, 255, 361, 483, 729, ... (A055927). %C A343018 n = 2: 5, 7, 13, 27, 37, 51, 61, 62, 73, 74, 91, 115, 123, ... (A230115). %C A343018 n = 3: 49, 99, 1023, 1681, 1935, 2499, 8649, 9603, 20449, ... (A230653). %C A343018 n = 4: 11, 17, 19, 31, 39, 43, 55, 65, 67, 69, 77, 87, 97, ... (A230654). %C A343018 n = 5: 35, 169, 289, 529, 961, 1369, 2809, 3135, 4489, ... (A228453). %H A343018 Robert Israel, <a href="/A343018/b343018.txt">Table of n, a(n) for n = 0..188</a> %F A343018 a(n) = A086550(n) - 1. %e A343018 For n = 3; a(3) = 49 because 49 is the smallest number such that tau(50) = 6 = tau(49) + 3 = 3 + 3. %p A343018 N:= 60: # for a(0)..a(N) %p A343018 V:= Array(0..N): count:=0: t:= numtheory:-tau(1): %p A343018 for m from 1 while count < N+1 do %p A343018 s:= numtheory:-tau(m+1); v:= s - t; %p A343018 if v >= 0 and v <= N and V[v] = 0 then count:= count+1; V[v]:= m; fi; %p A343018 t:= s; %p A343018 od: %p A343018 convert(V, list); # _Robert Israel_, Jan 03 2025 %t A343018 d = Differences @ Table[DivisorSigma[0, n], {n, 1, 10^6}]; a[n_] := If[(p = Position[d, n]) != {}, p[[1, 1]], 0]; s = {}; n = 0; While[(a1 = a[n]) > 0, AppendTo[s, a1]; n++]; s (* _Amiram Eldar_, Apr 03 2021 *) %o A343018 (Magma) Ax:=func<n|exists(r){m: m in[1..10^6] | #Divisors(m + 1) - #Divisors(m) eq n} select r else 0>; [Ax(n): n in [0..50]]; %o A343018 (PARI) a(n) = my(m=1); while (numdiv(m+1) != numdiv(m) + n, m++); m; \\ _Michel Marcus_, Apr 03 2021 %o A343018 (Python) %o A343018 from itertools import count, pairwise %o A343018 from sympy import divisor_count %o A343018 def A343018(n): return next(m+1 for m, t in enumerate(pairwise(map(divisor_count,count(1)))) if t[1] == t[0]+n) # _Chai Wah Wu_, Jul 25 2022 %Y A343018 Cf. A000005 (tau), A080371, A080372, A086550, A340799, A343019, A343020. %K A343018 nonn %O A343018 0,1 %A A343018 _Jaroslav Krizek_, Apr 02 2021