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!)
A339999 Squares that are divisible by both the sum of their digits and the product of their nonzero digits. 0
1, 4, 9, 36, 100, 144, 400, 900, 1296, 2304, 2916, 3600, 10000, 11664, 12100, 14400, 22500, 32400, 40000, 41616, 82944, 90000, 121104, 122500, 129600, 152100, 176400, 186624, 202500, 219024, 230400, 260100, 291600, 360000, 419904, 435600, 504100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
H. G. Grundman, Sequences of consecutive n-Niven numbers, Fibonacci Quarterly (1994) 32 (2): 174-175.
Jean-Marie De Koninck and Florian Luca, Positive integers divisible by the product of their nonzero digits, Port. Math. 64 (2007) 75-85. (This proof for upper bounds contains an error. See the paper below.)
EXAMPLE
For the perfect square 144 = 12^2, the sum of its digits is 9, which divides 144, and the product of its nonzero digits is 16, which also divides 144 so 144 is a term of the sequence.
MATHEMATICA
Select[Range[720]^2, And @@ Divisible[#, {Plus @@ (d = IntegerDigits[#]), Times @@ Select[d, #1 > 0 &]}] &] (* Amiram Eldar, Jul 23 2021 *)
PROG
(Python)
from math import prod
def sumd(n): return sum(map(int, str(n)))
def nzpd(n): return prod([int(d) for d in str(n) if d != '0'])
def ok(sqr): return sqr > 0 and sqr%sumd(sqr) == 0 and sqr%nzpd(sqr) == 0
print(list(filter(ok, (i*i for i in range(1001)))))
# Michael S. Branicky, Jul 23 2021
CROSSREFS
Intersection of A000290, A005349 and A055471.
Sequence in context: A179934 A239213 A346537 * A018224 A149137 A149138
KEYWORD
nonn,base
AUTHOR
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 April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)