login
A246337
Numbers n which when expressed in base 16 are palindromes whose digit sum and digit product both divide n.
2
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 273, 69905, 78129, 200979, 17903889, 4581298449, 1172816597265, 1174959919377, 300240008712465, 300240176484625, 370608786444625
OFFSET
1,2
PROG
(Python)
from operator import mul
from functools import reduce
from gmpy2 import t_mod, digits, mpz
A246337 = sorted([mpz(n, 16) for n in (digits(x, 16)+digits(x, 16)[::-1]
....for x in range(1, 16**7)) if not (n.count('0') or
....t_mod(mpz(n, 16), sum((mpz(d, 16) for d in n)))
....or t_mod(mpz(n, 16), reduce(mul, (mpz(d, 16) for d in n))))] +
....[mpz(n, 16) for n in (digits(x, 16)+digits(x, 16)[-2::-1]
....for x in range(16**7)) if not (n.count('0') or
....t_mod(mpz(n, 16), sum((mpz(d, 16) for d in n)))
....or t_mod(mpz(n, 16), reduce(mul, (mpz(d, 16) for d in n))))])
CROSSREFS
Sequence in context: A262545 A043320 A044917 * A161953 A187829 A356974
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Aug 22 2014
STATUS
approved