OFFSET
1,2
COMMENTS
EXAMPLE
100 is a term because the d(i)/d(i+1) triangle has bottom entry 1:
[1, 2, 4, 5, 10, 20, 25, 50, 100]
[1/2, 1/2, 4/5, 1/2, 1/2, 4/5, 1/2, 1/2]
[1, 5/8, 8/5, 1, 5/8, 8/5, 1]
[8/5, 25/64, 8/5, 8/5, 25/64, 8/5]
[512/125, 125/512, 1, 512/125, 125/512]
[262144/15625, 125/512, 125/512, 262144/15625]
[134217728/1953125, 1, 1953125/134217728]
[134217728/1953125, 134217728/1953125]
[1]
6 is not a term because the d(i)/d(i+1) triangle has bottom entry 9/16.
[1, 2, 3, 6]
[1/2, 2/3, 1/2]
[3/4, 4/3]
[9/16]
MATHEMATICA
Lst={}; Table[d=Divisors[n]; While[Length[d]>1, d=Ratios[Reverse[d]]]; If[d[[1]]==Floor[d[[1]]], AppendTo[Lst, n]], {n, 2000}]; Lst
PROG
(PARI)
ratios(v) = { my(u=vector(#v-1)); for(i=1, #u, u[i] = v[i]/v[1+i]); (u); };
isA359493(n) = { my(ds=divisors(n)); while(#ds>1, ds = ratios(ds)); (1==ds[1]); }; \\ Antti Karttunen, Jan 04 2023
(PARI) is(n) = { if(!(ispower(n) || n==1), return(0)); my(f = factor(n), d = divisors(f), m = Map(), i, j, nv, e, fd); for(i = 1, #d, e = (-1)^i * binomial(#d-1, i-1); fd = factor(d[i]); for(j = 1, #fd~, if(mapisdefined(m, fd[j, 1]), nv = mapget(m, fd[j, 1]); mapput(m, fd[j, 1], nv + e * fd[j, 2]) , mapput(m, fd[j, 1], e * fd[j, 2]) ) ) ); for(i = 1, #f~, if(mapget(m, f[i, 1]) != 0, return(0) ) ); return(1) } \\ David A. Corneth, Jan 07 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 03 2023
STATUS
approved