Yuto Tsujino has authored 2 sequences.
A387196
Integers k such that 1/k = (1/p - 1/q)*(1/r - 1/s) for distinct primes p < q and r < s.
Original entry on oeis.org
13, 17, 19, 20, 21, 25, 36, 37, 45, 49, 55, 91, 105, 127, 169, 181, 187, 247, 307, 361, 391, 429, 541, 577, 667, 811, 937, 961, 969, 1147, 1297, 1567, 1591, 1801, 1849, 1927
Offset: 1
1/13 = (1/2 - 1/5)*(1/3 - 1/13),
1/17 = (1/3 - 1/5)*(1/2 - 1/17),
1/20 = (1/2 - 1/3)*(1/2 - 1/5),
1/36 = (1/2 - 1/3)*(1/2 - 1/3),
1/45 = (1/2 - 1/3)*(1/3 - 1/5).
A384870
The largest k such that the set {1^n, 2^n, ..., k^n} has uniquely distinct subset sums.
Original entry on oeis.org
1, 2, 4, 5, 8, 11, 15, 19, 21, 28, 30, 37, 42, 45, 45
Offset: 0
For n=2, the set {1^2, 2^2, 3^2, 4^2} = {1, 4, 9, 16} has uniquely distinct subset sums.
However, adding 5^2 = 25 introduces a duplicate sum: 9 + 16 = 25.
Thus, the largest k that satisfies the subset sum uniqueness condition is 4, meaning a(2)=4.
-
A := proc(n)
local k, S, T, subsetsum;
k := 1;
while true do
S := {seq(i^n, i=1..k)};
T := combinat[powerset](S);
subsetsum := map(x -> add(x), T);
if numelems(subsetsum) = numelems(T) then
k := k + 1;
else
return k - 1;
end if;
end do;
end proc;
-
A[n_] := Module[{k = 1, S, subsetSums},
While[True,
S = Table[i^n, {i, 1, k}];
subsetSums = Total /@ Subsets[S];
If[Length[subsetSums] == Length[DeleteDuplicates[subsetSums]], k++, Return[k - 1]];
]
]
-
isok(k,n) = my(list=List()); forsubset(k, s, listput(list, sum(i=1, #s, s[i]^n));); if (#Set(list) != #list, return(0)); 1;
a(n) = for (k=1, oo, if (!isok(k,n), return(k-1));); \\ Michel Marcus, Jun 14 2025
-
\\ See Corneth link
-
def a(n):
k = 1
while True:
powers = [(i + 1) ** n for i in range(k)]
subset_sums = set()
all_unique = True
for mask in range(1 << k):
total = sum(powers[i] for i in range(k) if mask & (1 << i))
if total in subset_sums:
all_unique = False
break
subset_sums.add(total)
if not all_unique:
return k - 1
k += 1
print([a(n) for n in range(9)])
-
from itertools import chain, combinations, count
def powerset(s):
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
def a(n):
s, sums = {1}, {1}
for k in count(2):
t = k**n
newsums = set(sum(ss)+t for ss in powerset(s))
if newsums & sums:
return k-1
s, sums = s|{t}, s|newsums
print([a(n) for n in range(9)]) # Michael S. Branicky, Jun 14 2025
Comments