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!)
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
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 A348810 A306502
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:08 EDT 2024. Contains 371794 sequences. (Running on oeis4.)