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!)
A158214 Smallest palindromic prime made up of 0's and k 1's, where k = A007310(n), odd numbers not divisible by 3. 2
100111001, 110111011, 1110111110111, 10111101110111101, 100111111111111111001, 1111111111111111111, 11111111111111111111111, 10111111111101110111111111101, 1111110111111111111111110111111 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

Smallest palindromic prime with digit sum A007310(n) and using only 0's and 1's.

LINKS

Chai Wah Wu, Table of n, a(n) for n = 2..167

PROG

(Python)

from __future__ import division

from sympy.utilities.iterables import multiset_permutations

from sympy import isprime

A158214_list = []

for i in range(2, 101):

    if i % 6 == 1 or i % 6 == 5:

        i2 = i//2

        l = i2

        flag = True

        while flag:

            dlist = '0'*(l-i2) + '1'*i2

            for d in multiset_permutations(dlist):

                s = ''.join(d)

                n = int(s+'1'+s[::-1])

                if isprime(n):

                    A158214_list.append(n)

                    flag = False

                    break

            else:

                l += 1 # Chai Wah Wu, Dec 17 2015

CROSSREFS

Cf. A020449.

Sequence in context: A017276 A017516 A017648 * A052096 A306502 A218091

Adjacent sequences:  A158211 A158212 A158213 * A158215 A158216 A158217

KEYWORD

nonn,base

AUTHOR

Lekraj Beedassy, Mar 13 2009

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 October 24 05:38 EDT 2021. Contains 348217 sequences. (Running on oeis4.)