OFFSET
1,1
COMMENTS
These numbers come mostly in chunks/runs of length 2 or 36 or 23 (first occurring as length of the 7th run starting with 706) or later 14 (length of a run starting at 6768), 1081 (length of a run starting with 15303), 20 (length of a run starting with 21186), ...
The first isolated terms are a(2701) = 25595 and a(2702) = 25774.
This set exhibits an interesting self-similar, pseudo-symmetric structure. This is due to the following
Proposition: Let d(n) = (3^r(n)-1)/2 + (4^s(n)-1)/3, where r and s are exponents such that 4^(s(n)-1) <= 3^(r(n)-1) < 3^r(n) < 4^s(n), r(0) = s(0) = 1 being the only case with equality. Then any x <= d(n) is in this sequence iff d(n) - x is in the sequence.
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..20000
EXAMPLE
0 is the empty sum, 1 = 3^0 = 4^0, 2 = 3^0 + 4^0 (*), 3 = 3^1, 4 = 4^1, 5 = 4^0 + 4^1, 6 = 3^0 + 4^0 + 4^1 (*), ..., so these numbers are not in this sequence.
After 61 = 3^0 + 3^1 + 3^2 + 3^3 + 4^0 + 4^1 + 4^2, the next larger number that is such a sum of powers is 64 = 4^3, which creates the first gap of [62, 63], first terms of this sequence.
PROG
(PARI) S34_upto(N)={my( p(N, b)=[b^k|k<-[0..logint(N, b)]] , S=[0] , i); for(b=3, 4,
foreach(p(N, b), x, S = setunion(S, [x+y| y<-S[1 .. if( S[#S]+x < N, -1,
i=setsearch(S, N-x, 1), i-1, setsearch(S, N-x)) ]]))); S}
A367090_upto(N) = setminus([1..N], S34_upto(N)) \\ not very efficient...
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 08 2023
STATUS
approved