login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261534 Nonprime palindromes n with only the digits 0, 1, 2 such that the product of divisors of n is also a palindrome. 1
1, 22, 111, 121, 202, 1001, 1111, 10001, 10201, 11111, 100001, 1000001, 1001001, 1012101, 1100011, 1101011, 1111111, 10000001, 100000001, 101000101, 110000011, 200010002, 10000000001, 10011111001, 11000100011, 11001010011, 11100100111, 11101010111, 20000100002 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A subsequence of A244423.

LINKS

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

MATHEMATICA

lim = 1000000; palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; c = Complement[Range@ lim, Prime@ Range@ PrimePi@ lim]; t = Select[c, Total@ Take[RotateRight@ DigitCount@ #, -7] == 0 &]; Select[t, palQ[Times @@ Divisors@ #] &] (* Michael De Vlieger, Sep 02 2015 *)

Rest[Select[FromDigits/@Tuples[{0, 1, 2}, 11], !PrimeQ[#]&&AllTrue[{#, Times@@ Divisors[ #]}, PalindromeQ]&]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 02 2020 *)

PROG

(Python)

from __future__ import division

from sympy import divisor_count

from gmpy2 import isqrt, t_divmod, digits

def palgen(l, b=10): # generator of palindromes in base b of length <= 2*l

    if l > 0:

        yield 0

        for x in range(1, l+1):

            n = b**(x-1)

            n2 = n*b

            for y in range(n, n2):

                k, m = y//b, 0

                while k >= b:

                    k, r = t_divmod(k, b)

                    m = b*m + r

                yield y*n + b*m + k

            for y in range(n, n2):

                k, m = y, 0

                while k >= b:

                    k, r = t_divmod(k, b)

                    m = b*m + r

                yield y*n2 + b*m + k

A261534_list = [1]

for m in palgen(17, 3):

    n = int(digits(m, 3))

    d = int(divisor_count(n))

    if d > 2:

        q, r = t_divmod(d, 2)

        s = digits(n**q*(isqrt(n) if r else 1))

        if s == s[::-1]:

            A261534_list.append(n)

CROSSREFS

Cf. A244411, A244423.

Sequence in context: A126409 A233299 A174074 * A041938 A084013 A083123

Adjacent sequences:  A261531 A261532 A261533 * A261535 A261536 A261537

KEYWORD

nonn,base

AUTHOR

Chai Wah Wu, Aug 31 2015

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 4 19:15 EDT 2020. Contains 336202 sequences. (Running on oeis4.)