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.

A330827 a(n) is the numbers of ways to write 2*n = u + v where the ternary representations of u and of v have the same number of digits d for d = 0..2.

This page as a plain text file.
%I A330827 #27 Jan 14 2020 00:54:07
%S A330827 1,1,1,1,1,1,3,1,1,1,1,3,1,3,1,5,3,3,5,3,5,3,3,1,3,1,1,1,1,3,1,3,3,5,
%T A330827 3,5,3,5,5,5,7,5,7,7,5,9,7,7,11,7,9,7,7,7,11,9,13,5,9,5,15,7,9,7,7,7,
%U A330827 7,7,5,5,5,3,5,3,5,3,3,1,3,1,1,1,1,3,1,3
%N A330827 a(n) is the numbers of ways to write 2*n = u + v where the ternary representations of u and of v have the same number of digits d for d = 0..2.
%C A330827 In other words, a(n) is the number of ways to write 2*n as the sum of two ternary anagrams.
%C A330827 Leading zeros are ignored.
%C A330827 Two ternary anagrams have necessarily the same parity, hence an odd number cannot be the sum of two ternary anagrams.
%H A330827 Rémy Sigrist, <a href="/A330827/b330827.txt">Table of n, a(n) for n = 0..19683</a>
%H A330827 Rémy Sigrist, <a href="/A330827/a330827.gp.txt">PARI program for A330827</a>
%H A330827 Rémy Sigrist, <a href="/A330827/a330827.png">Scatterplot of (x, y) such that 0 <= x, y <= 3^7 and x and y are ternary anagrams</a> (a(n) corresponds to the number of pixels (x, y) such that x+y = n)
%e A330827 For n = 6:
%e A330827 - we can write 12 as u + v in the following ways:
%e A330827   u  v  ter(u)  ter(v)
%e A330827   -  -  ------  ------
%e A330827   5  7      12      21
%e A330827   6  6      20      20
%e A330827   7  5      21      12
%e A330827 - hence a(6) = 3.
%o A330827 (PARI) See Links section.
%Y A330827 Cf. A331216 (binary analog), A331218 (decimal analog).
%K A330827 nonn,base
%O A330827 0,7
%A A330827 _Rémy Sigrist_, Jan 12 2020