A233573 Number of ways n can be partitioned as A233010(i)+A233572(j), where i,j >= 1.
1, 1, 1, 2, 1, 1, 2, 2, 1, 4, 2, 2, 3, 2, 1, 3, 2, 1, 4, 2, 2, 4, 2, 2, 3, 2, 1, 6, 3, 4, 5, 2, 3, 5, 3, 3, 7, 1, 3, 4, 2, 3, 4, 1, 2, 5, 2, 3, 5, 1, 2, 2, 2, 2, 6, 1, 4, 3, 3, 3, 6, 4, 2, 7, 3, 3, 4, 4, 3, 5, 3, 2, 6, 3, 1, 4, 3, 1, 2, 4, 2, 9, 4, 4, 7, 3, 2
Offset: 0
Examples
0=0+0=A233010(1)+A233572(1). This is the only valid partition by definition. So a(0)=1. 3=3+0=A233010(3)+A233572(1), as well 3=1+2=A233010(2)+A233572(2). Two valid partitions found. So a(3)=2. 9=9+0=7+2=3+6=1+8, four valid partitions found. So a(9)=4.
Links
- Lei Zhou, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
BTDigits[m_Integer, g_] := (*This is to determine digits of a number in balanced ternary notation.*) Module[{n = m, d, sign, t = g}, If[n != 0, If[n > 0, sign = 1, sign = -1; n = -n]; d = Ceiling[Log[3, n]]; If[3^d - n <= ((3^d - 1)/2), d++]; While[Length[t] < d, PrependTo[t, 0]]; t[[Length[t] + 1 - d]] = sign; t = BTDigits[sign*(n - 3^(d - 1)), t]]; t]; BTpaleQ[n_Integer] := (*This is to query if a number is an element of sequence A233010.*) Module[{t, trim = n/3^IntegerExponent[n, 3]}, t = BTDigits[trim, {0}]; t == Reverse[t]]; BTrteQ[n_Integer] := (*This is to query if a number is an element of sequence A233572.*) Module[{t, trim = n/3^IntegerExponent[n, 3]}, t = BTDigits[trim, {0}]; DeleteDuplicates[t + Reverse[t]] == {0}]; sa = Select[Range[0, 11000], BTpaleQ[#] &]; (*This is to generate a limited list of A233010.*) sb = Select[Range[0, 11000], BTrteQ[#] &]; (*This is to generate a limited list of A233572.*) range = 86; Table[ct = 0; i1 = 0; While[i1++; sa[[i1]] <= n, i2 = 0; While[i2++; (sa[[i1]] + sb[[i2]]) <= n, If[(sa[[i1]] + sb[[i2]]) == n, ct++]]]; ct, {n, 0, range}]
Comments