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.

A133987 a(n) = A005704( (3^n + (-1)^n - 2)/4 ), where A005704(n) = number of partitions of 3n into powers of 3.

This page as a plain text file.
%I A133987 #7 Mar 31 2012 20:25:45
%S A133987 1,1,3,12,117,2250,107352,12298500,3613136949,2742962912055,
%T A133987 5503085134707267,29497134965411187747,427365985177386403469028,
%U A133987 16883252883454411208147060304,1832920589508888783152391724736550
%N A133987 a(n) = A005704( (3^n + (-1)^n - 2)/4 ), where A005704(n) = number of partitions of 3n into powers of 3.
%H A133987 Alois P. Heinz, <a href="/A133987/b133987.txt">Table of n, a(n) for n = 0..40</a>
%F A133987 (3^n + (-1)^n - 2)/4 gives the n-th number that has alternating base-3 digits {0,2} (starting with zero).
%e A133987 Let b(n) = A005704(n) = number of partitions of 3n into powers of 3, then
%e A133987 the initial terms of this sequence begin:
%e A133987 b(0), b(0), b(2), b(6), b(20), b(60), b(182), b(546), b(1640),...
%e A133987 APPLICATION: SPECIAL TERNARY TREE.
%e A133987 a(n) = number of nodes in generation n of the following tree.
%e A133987 Start at generation 0 with a single root node labeled [1].
%e A133987 From then on, each parent node [k] is attached to k child nodes with
%e A133987 labels congruent to 1(mod 3) for even n, or 3(mod 3) for odd n,
%e A133987 within the range {1..3k}, for generation n >= 0.
%e A133987 The initial generations 0..4 of the tree are as follows;
%e A133987 the path from the root node is given, followed by child nodes in [].
%e A133987 GEN.0: [1];
%e A133987 GEN.1: 1->[3];
%e A133987 GEN.2: 1-3->[1,4,7];
%e A133987 GEN.3:
%e A133987 1-3-1->[3]
%e A133987 1-3-4->[3,6,9,12]
%e A133987 1-3-7->[3,6,9,12,15,18,21];
%e A133987 GEN.4:
%e A133987 1-3-1-3->[1,4,7]
%e A133987 1-3-4-3->[1,4,7]
%e A133987 1-3-4-6->[1,4,7,10,13,16]
%e A133987 1-3-4-9->[1,4,7,10,13,16,19,22,25]
%e A133987 1-3-4-12->[1,4,7,10,13,16,19,22,25,28,31,34]
%e A133987 1-3-7-3->[1,4,7]
%e A133987 1-3-7-6->[1,4,7,10,13,16]
%e A133987 1-3-7-9->[1,4,7,10,13,16,19,22,25]
%e A133987 1-3-7-12->[1,4,7,10,13,16,19,22,25,28,31,34]
%e A133987 1-3-7-15->[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43]
%e A133987 1-3-7-18->[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52]
%e A133987 1-3-7-21->[1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61] .
%e A133987 Note: the sum of the labels in generation n equals a(n+1) and
%e A133987 the largest term in generation n = (3^(n+1) + (-1)^(n+1) - 2)/4 + 1.
%o A133987 (PARI) {A005704(n) = if(n<1, n==0, A005704(n\3) + A005704(n-1))} {a(n) = A005704( (3^n + (-1)^n - 2)/4 )}
%Y A133987 Cf. A005704; variants: A132843, A132880.
%K A133987 nonn
%O A133987 0,3
%A A133987 _Paul D. Hanna_, Oct 01 2007