login
A246338
Numbers n which when expressed in base 8 are palindromes whose digit sum and digit product both divide n.
2
1, 2, 3, 4, 5, 6, 7, 105, 4809, 299593, 1227264585, 1231525449, 1495765593, 21734674907255625, 128700665796293199, 129237637608018639
OFFSET
1,2
PROG
(Python)
from operator import mul
from functools import reduce
from gmpy2 import t_mod, digits, mpz
A246338 = sorted([mpz(n, 8) for n in (digits(x, 8)+digits(x, 8)[::-1]
....for x in range(1, 8**6)) if not (n.count('0') or
....t_mod(mpz(n, 8), sum((mpz(d, 8) for d in n)))
....or t_mod(mpz(n, 8), reduce(mul, (mpz(d, 8) for d in n))))] +
....[mpz(n, 8) for n in (digits(x, 8)+digits(x, 8)[-2::-1]
....for x in range(8**6)) if not (n.count('0') or
....t_mod(mpz(n, 8), sum((mpz(d, 8) for d in n)))
....or t_mod(mpz(n, 8), reduce(mul, (mpz(d, 8) for d in n))))])
CROSSREFS
Sequence in context: A028429 A331565 A171644 * A037334 A037441 A270436
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Aug 22 2014
STATUS
approved