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!)
A138584 Palindromic primes using only digits 3 and 5. 1
3, 5, 353, 33533, 35353, 3353533, 3553553, 333535333, 335333533, 355353553, 355555553, 33335353333, 33553335533, 35533333553, 35553535553, 3335535355333, 3335555555333, 3353353533533, 3353355533533, 3355535355533, 3533355533353, 3533533353353 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

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

MAPLE

revdigs:= proc(n) option remember;

    local b;

    if n < 10 then return n fi;

    b:= n mod 10;

    b*10^ilog10(n) + procname((n-b)/10);

end proc:

A:= {3, 5}:

B:= [0]:

for d from 2 to 20 do

  if d::even then

    B:= map(t -> (10*t+3, 10*t+5), B);

    A:= A union select(isprime, {seq(revdigs(b)+10^(d/2)*b, b=B)});

  else

    A:= A union select(isprime, {seq(seq(

         revdigs(b)+i*10^((d-1)/2)+10^((d+1)/2)*b, i = [3, 5]), b=B)});

  fi

od:

sort(convert(A, list)); # Robert Israel, Dec 17 2015

PROG

(Python)

from itertools import product

from sympy import isprime

A138584_list = []

for l in range(17):

    for d in product('35', repeat=l):

        s = ''.join(d)

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

        if isprime(n):

            A138584_list.append(n)

        n += 2*10**l

        if isprime(n):

            A138584_list.append(n) # Chai Wah Wu, Dec 17 2015

CROSSREFS

Cf. A020462.

Sequence in context: A280035 A087670 A271390 * A277995 A247699 A320939

Adjacent sequences:  A138581 A138582 A138583 * A138585 A138586 A138587

KEYWORD

nonn,base

AUTHOR

Paul Curtz, May 13 2008

EXTENSIONS

More terms from Arkadiusz Wesolowski, Dec 31 2011

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 April 10 07:44 EDT 2021. Contains 342843 sequences. (Running on oeis4.)