login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A363408 Squares whose base-3 expansion has no 2. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
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.
LINKS
FORMULA
a(n) = A176189(n-1)^2 for n>=2. - Alois P. Heinz, Jun 07 2023
EXAMPLE
a(5) = 36 is a term because 36 = 6^2 = 3^2 + 3^3.
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 *)
PROG
(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
CROSSREFS
Intersection of A000290 and A005836. Cf. A363428.
Cf. A176189.
Sequence in context: A326182 A053057 A118547 * A115700 A029806 A133125
KEYWORD
nonn,base
AUTHOR
Robert Israel, May 31 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 5 07:27 EDT 2024. Contains 375686 sequences. (Running on oeis4.)