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.

A074939 Even numbers such that base 3 representation contains no 2.

Original entry on oeis.org

0, 4, 10, 12, 28, 30, 36, 40, 82, 84, 90, 94, 108, 112, 118, 120, 244, 246, 252, 256, 270, 274, 280, 282, 324, 328, 334, 336, 352, 354, 360, 364, 730, 732, 738, 742, 756, 760, 766, 768, 810, 814, 820, 822, 838, 840, 846, 850, 972, 976, 982, 984, 1000, 1002
Offset: 0

Views

Author

Benoit Cloitre, Oct 04 2002; Nov 15 2003

Keywords

Comments

Even numbers in A005836; n such that binomial(2n,n) == 1 (mod 3).
Sum of an even number of distinct powers of 3. - Emeric Deutsch, Dec 03 2003

Crossrefs

Intersection of A005843 and A005836.

Programs

  • Mathematica
    Select[2*Range[0,600],DigitCount[#,3,2]==0&] (* Harvey P. Dale, Dec 10 2016 *)
  • Python
    def A074939(n): return int(bin((n.bit_count()&1)+(n<<1))[2:],3) # Chai Wah Wu, Jun 26 2025

Formula

a(n) = A083094(n)/2; a(n) mod 3 = A010060(n); n such that coefficient of x^n equals 1 in Product_{k>=0} (1 - x^(3^k)).
a(n) + A074938(n) = A055246(n+1). - Philippe Deléham, Jul 10 2005