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.

A337296 Number whose sum and product of ternary representation digits are equal.

This page as a plain text file.
%I A337296 #16 Oct 16 2023 01:47:43
%S A337296 0,1,2,8,134,152,158,160,206,212,214,230,232,238,265760,265814,265832,
%T A337296 265838,265840,265976,265994,266000,266002,266048,266054,266056,
%U A337296 266072,266074,266080,266462,266480,266486,266488,266534,266540,266542,266558,266560,266566
%N A337296 Number whose sum and product of ternary representation digits are equal.
%C A337296 In ternary representation all the terms except 0 are zeroless (A032924).
%C A337296 If k is the number of digits 2 of a term, then the number of digits 1 is 2^k - 2*k, and the total number of digits is thus 2^k - k (A000325).
%C A337296 The total number of terms with k digits 2, for k = 1, 2, ..., is binomial(2^k-k,k) = 1, 1, 10, 495, 80730, 40475358, ...
%H A337296 Amiram Eldar, <a href="/A337296/b337296.txt">Table of n, a(n) for n = 1..10000</a>
%e A337296 8 is a term since in base 3 the representation of 8 is 22 and 2 + 2 = 2 * 2.
%t A337296 Select[Range[0, 266566], Times @@ (d = IntegerDigits[#, 3]) == Plus @@ d &]
%t A337296 (* or *)
%t A337296 f[k_] := FromDigits[#, 3] & /@ Permutations[Join[Table[1, {2^k - 2*k}], Table[2, k]]]; Flatten@ Join[{0}, Table[f[k], {k, 0, 4}]] (* _Amiram Eldar_, Oct 16 2023 *)
%o A337296 (PARI) isok(m) = my(d=digits(m,3)); vecsum(d) == vecprod(d); \\ _Michel Marcus_, Aug 22 2020
%Y A337296 The ternary version of A034710.
%Y A337296 Cf. A000325, A032924.
%K A337296 nonn,base
%O A337296 1,3
%A A337296 _Amiram Eldar_, Aug 21 2020