cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A233573 Number of ways n can be partitioned as A233010(i)+A233572(j), where i,j >= 1.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Dec 13 2013

Keywords

Comments

Number in sequence A233010 takes palindrome form when written in balanced ternary notation and left patch same number of zeros as number of trailing zeros, which means that if we slice the balanced ternary notation number with left zero padding in the middle, the left part is a mirrored image of the right part. This is a feature like an even function.
Number in sequence A233571 takes "reversed palindrome form" when written in balanced ternary notation and left patch same number of zeros as number of trailing zeros, which means that if we slice the balanced ternary notation number with left zero padding in the middle, the left part is a mirrored image of the right part with sign changes. This is a feature like an odd function.
This sequence gives the number of possibilities of such partitions.
In the first 10000 terms, 152 zeros found.

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.
		

Crossrefs

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}]