login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118548 Squares which are divisible by the product of their digits. 1
1, 4, 9, 36, 144, 1296, 2916, 11664, 41616, 82944, 186624, 1218816, 2214144, 11614464, 21123216, 21233664, 22127616, 27123264, 49787136, 122943744, 146313216, 171714816, 222129216, 429981696, 812934144, 1316818944 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Subsequence of squares in A007602. - Michel Marcus, Aug 24 2014

LINKS

Chai Wah Wu, Table of n, a(n) for n = 1..143

EXAMPLE

2916 is in the sequence because (1) it is a square, (2) the product of its digits is 2*9*1*6=108 and (3) 2916 is divisible by 108.

MATHEMATICA

sdpdQ[n_]:=Module[{idn=IntegerDigits[n]}, !MemberQ[idn, 0]&&Divisible[ n, Times@@idn]]; Select[Range[40000]^2, sdpdQ] (* Harvey P. Dale, Jul 04 2013 *)

PROG

(Python)

from operator import mul

from functools import reduce

from gmpy2 import t_mod, mpz

A118548 = [n for n in (x**2 for x in range(1, 10**6)) if not (str(n).count('0') or t_mod(n, reduce(mul, (mpz(d) for d in str(n)))))]

# Chai Wah Wu, Aug 23 2014

(PARI) lista(nn) = {for (n=1, nn, sq = n^2; d = digits(sq); p = prod(k=1, #d, d[k]); if (p && !(sq % p), print1(sq, ", ")); ); } \\ Michel Marcus, Aug 24 2014

CROSSREFS

Cf. A007602.

Sequence in context: A001256 A227253 A029997 * A176830 A077211 A073977

Adjacent sequences:  A118545 A118546 A118547 * A118549 A118550 A118551

KEYWORD

base,nonn

AUTHOR

Luc Stevens (lms022(AT)yahoo.com), May 03 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 08:57 EDT 2019. Contains 326077 sequences. (Running on oeis4.)