A382685 a(n) is the least integer k requiring any combination of at least n 1's or 2's to build using + and *.
1, 3, 5, 7, 11, 19, 23, 43, 59, 107, 173, 283, 383, 719, 1103, 1439, 3019, 4283, 8563, 14207, 20719, 31667, 52919, 105838, 165749, 290219, 495359, 880799, 1529279, 2417399, 4085639, 6973259
Offset: 1
Examples
a(6) = 19 because 19 = 1 + (2 + 2 * 2 * 2 * 2 ), and 19 cannot be built with five 1 and 2's. a(10) = 107 because 107 = 1 + (2 + 2 * 2 * (2 + 2 * 2 * (2 + 2 * 2 ))), and 107 cannot be built with nine 1 and 2's.
Links
- Shouen Wang, Using 1, 2, +, x, () to build positive integers, Chinese BBS.
- Index to sequences related to the complexity of n
Programs
-
Maple
N:= 10^6: # for terms <= N M[1]:= {1,2}: T[1]:= M[1]: A:= 1: for n from 2 do M[n]:= `union`(seq({seq(seq(x+y, x = select(`<=`,M[i],N-y)),y=M[n-i])},i=1..n/2), seq({seq(seq(x*y, x = select(`<=`,M[i],N/y)),y=M[n-i])},i=1..n/2)) minus T[n-1]; T[n]:= T[n-1] union M[n]; if M[n] = {} then break fi; A:= A, min(M[n]); od: A; # Robert Israel, Jun 09 2025
-
Mathematica
num=1500; b=Array[99999&,num];a={}; b[[1]]=b[[2]]=1; r=1; Do[Do[s=b[[k]]+b[[n/k]];If[s
Extensions
a(28)-a(32) from Hongyang Cao, Jun 10 2025
Comments