OFFSET
1,1
EXAMPLE
MATHEMATICA
d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); tridiv[n_] := DivisorSum[n, 1 &, IntegerQ[Sqrt[8*# + 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 2, i}, While[c < len && n < nmax, i = tridiv[n]; If[i <= len && s[[i]] == 0 && tridiv[d[n]] == i, c++; s[[i]] = n]; n++]; s]; seq[10, 10^6] (* Amiram Eldar, Oct 21 2022 *)
PROG
(Magma) tr:=func<k|#[d:d in Divisors(k)|IsSquare(8*d+1)]>; f:=func<h |h le 1 select 0 else h*(&+[Factorisation(h)[i][2] / Factorisation(h)[i][1]: i in [1..#Factorisation(h)]])>; a:=[]; for n in [1..30] do k:=2 ; while tr(k) ne n or tr(Floor(f(k))) ne n do k:=k+1; end while; Append(~a, k); end for; a;
(PARI) f(n) = sumdiv(n, d, ispolygonal(d, 3)); \\ A007862
ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
a(n) = my(k=2); while((f(k)!=n) || (f(ad(k))!=n), k++); k; \\ Michel Marcus, Oct 23 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Marius A. Burtea, Oct 20 2022
STATUS
approved