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-1 of 1 results.

A363428 Squares whose base-3 expansion has no 0.

Original entry on oeis.org

1, 4, 16, 25, 49, 121, 400, 484, 1444, 1849, 3364, 5476, 10201, 10609, 10816, 12769, 17161, 19321, 19600, 155236, 169744, 274576, 286225, 344569, 346921, 450241, 502681, 863041, 885481, 984064, 1042441, 4008004, 4190209, 4596736, 7203856, 7263025, 7706176, 12752041, 14326225, 14341369, 23833924
Offset: 1

Views

Author

Robert Israel, Jun 01 2023

Keywords

Examples

			a(5) = 49 is a term because 49 = 7^2 = 1121_3.
		

Crossrefs

Intersection of A000290 and A032924. Cf. A363408.

Programs

  • Maple
    R1:= {1};
    S1:= {1,2};
    for i from 1 to 15 do
      S1:= map(t -> (3*t+1, 3*t+2), S1);
      R1:= R1 union select(issqr,S1);
    od:
    Rl;
  • Mathematica
    Select[Range[5000]^2, ! MemberQ[IntegerDigits[#, 3], 0] &] (* Amiram Eldar, Jun 01 2023 *)
  • Python
    from itertools import islice, count
    from gmpy2 import digits
    def A363428_gen(): # generator of terms
        return filter(lambda n:'0' not in digits(n,3), (n**2 for n in count(0)))
    A363428_list = list(islice(A363428_gen(),20)) # Chai Wah Wu, Jun 17 2023
Showing 1-1 of 1 results.