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!)
A343726 Squares with exactly one even digit. 2
0, 4, 16, 25, 36, 49, 81, 121, 169, 196, 361, 529, 576, 729, 961, 1156, 1369, 1521, 1936, 3136, 3721, 3969, 5329, 5776, 5929, 7396, 7569, 7921, 15129, 15376, 17161, 17956, 19321, 31329, 35721, 51529, 53361, 57121, 59536, 97969, 111556, 113569, 119716, 131769 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The even digit is always one of the last two digits.
The only squares with no digits even are the one-digit odd squares 1 and 9.
LINKS
FORMULA
Intersection of A000290 and A118070.
MAPLE
q:= n-> (l-> is(add(i mod 2, i=l)=nops(l)-1))(convert(n, base, 10)):
select(q, [i^2$i=0..400])[]; # Alois P. Heinz, May 22 2021
MATHEMATICA
Select[Range[0, 400]^2, Count[IntegerDigits[#], _?EvenQ] == 1 &] (* Amiram Eldar, May 21 2021 *)
PROG
(Python)
def ok(sq): return sum(d in "02468" for d in str(sq)) == 1
def aupto(limit):
sqs = (i*i for i in range(int(limit**.5)+2) if i*i <= limit)
return list(filter(ok, sqs))
print(aupto(131769)) # Michael S. Branicky, May 20 2021
(PARI) isA343726(n) = if(issquare(n) && (n!=0), my(d=digits(n)); #d - vecsum(d%2) == 1, n==0) \\ Jianing Song, May 22 2021
CROSSREFS
Sequence in context: A103052 A228004 A269157 * A202303 A350835 A214937
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, May 19 2021
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 May 2 16:57 EDT 2024. Contains 372198 sequences. (Running on oeis4.)