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.

Showing 1-2 of 2 results.

A363408 Squares whose base-3 expansion has no 2.

Original entry on oeis.org

0, 1, 4, 9, 36, 81, 121, 256, 324, 361, 729, 841, 1089, 2304, 2916, 3025, 3249, 6561, 6889, 7569, 9801, 20449, 20736, 26244, 26569, 27225, 29241, 59049, 60025, 62001, 68121, 68644, 88209, 177241, 184041, 186624, 203401, 236196, 237169, 239121, 245025, 263169, 531441, 534361, 540225, 558009
Offset: 1

Views

Author

Robert Israel, May 31 2023

Keywords

Comments

Squares that are the sum of distinct powers of 3.
If k is a term, then so is 9*k.
The only square whose base-3 expansion has no 1 is 0.

Examples

			a(5) = 36 is a term because 36 = 6^2 = 3^2 + 3^3.
		

Crossrefs

Intersection of A000290 and A005836. Cf. A363428.
Cf. A176189.

Programs

  • Maple
    R:= {0,1};
    S:= {1};
    for i from 1 to 20 do
      S:= map(t -> (3*t, 3*t+1), S);
      R:= R union select(issqr,S)
    od:
    R;
  • Mathematica
    Select[Range[0, 1000]^2, ! MemberQ[IntegerDigits[#, 3], 2] &] (* Amiram Eldar, Jun 01 2023 *)
  • Python
    from gmpy2 import digits
    def okA176189(n): return "2" not in digits(n*n, 3)
    print([k**2 for k in range(1000) if okA176189(k)]) # Michael S. Branicky, Jun 07 2023

Formula

a(n) = A176189(n-1)^2 for n>=2. - Alois P. Heinz, Jun 07 2023

A219115 Numbers whose squares have at least one 1 and one 2 in ternary representation.

Original entry on oeis.org

4, 5, 7, 8, 10, 12, 13, 14, 15, 17, 20, 21, 22, 23, 24, 25, 26, 28, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84
Offset: 1

Views

Author

Michel Marcus, Nov 12 2012

Keywords

Comments

So a(n)^2 belongs to A125293.
Complement of A176189.

Crossrefs

Programs

  • Mathematica
    Select[Range[100],DigitCount[#^2,3,1]>0&&DigitCount[#^2,3,2]>0&] (* Harvey P. Dale, May 07 2015 *)
Showing 1-2 of 2 results.