A343019 a(n) is the smallest number m such that tau(m+1) = tau(m) - n.
2, 4, 6, 16, 12, 24, 30, 36, 84, 324, 60, 144, 192, 120, 210, 288, 180, 528, 240, 576, 480, 360, 420, 900, 1344, 960, 720, 5184, 1008, 840, 1320, 2400, 1260, 17424, 1800, 14640, 2640, 1680, 2160, 8280, 4800, 3600, 11220, 7056, 3780, 6240, 2520, 82944, 6480
Offset: 0
Keywords
Examples
For n = 3; a(3) = 16 because 16 is the smallest number such that tau(17) = 2 = tau(16) - 3 = 5 - 3.
Links
- Robert Israel, Table of n, a(n) for n = 0..174
Programs
-
Magma
Ax:=func
; [Ax(n): n in [0..50]] -
Maple
N:= 50: # for a(0)..a(N) V:= Array(0..N): count:=0: t:= numtheory:-tau(1): for m from 1 while count < N+1 do s:= numtheory:-tau(m+1); v:= t - s; if v >= 0 and v <= N and V[v] = 0 then count:= count+1; V[v]:= m; fi; t:= s; od: convert(V,list); # Robert Israel, Jul 03 2024
-
Mathematica
d = Differences @ Table[DivisorSigma[0, n], {n, 1, 10^5}]; 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 *)
-
PARI
a(n) = my(m=1); while (numdiv(m+1) != numdiv(m) - n, m++); m; \\ Michel Marcus, Apr 03 2021
-
Python
from itertools import count, pairwise from sympy import divisor_count def A343019(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
Comments