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!)
A246338 Numbers n which when expressed in base 8 are palindromes whose digit sum and digit product both divide n. 2

%I #9 Sep 01 2014 01:35:29

%S 1,2,3,4,5,6,7,105,4809,299593,1227264585,1231525449,1495765593,

%T 21734674907255625,128700665796293199,129237637608018639

%N Numbers n which when expressed in base 8 are palindromes whose digit sum and digit product both divide n.

%o (Python)

%o from operator import mul

%o from functools import reduce

%o from gmpy2 import t_mod, digits, mpz

%o A246338 = sorted([mpz(n,8) for n in (digits(x,8)+digits(x,8)[::-1]

%o ....for x in range(1,8**6)) if not (n.count('0') or

%o ....t_mod(mpz(n,8), sum((mpz(d,8) for d in n)))

%o ....or t_mod(mpz(n,8), reduce(mul,(mpz(d,8) for d in n))))] +

%o ....[mpz(n,8) for n in (digits(x,8)+digits(x,8)[-2::-1]

%o ....for x in range(8**6)) if not (n.count('0') or

%o ....t_mod(mpz(n,8), sum((mpz(d,8) for d in n)))

%o ....or t_mod(mpz(n,8), reduce(mul,(mpz(d,8) for d in n))))])

%Y Cf. A117228, A246337.

%K nonn,base

%O 1,2

%A _Chai Wah Wu_, Aug 22 2014

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 5 13:00 EDT 2024. Contains 372275 sequences. (Running on oeis4.)