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!)
A050784 Palindromic primes containing no pair of consecutive equal digits. 3
2, 3, 5, 7, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 10301, 10501, 10601, 12421, 12721, 12821, 13831, 13931, 14341, 14741, 15451, 16061, 16361, 16561, 17471, 17971, 18181, 18481, 19391, 19891, 30103, 30203 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
nextL:= proc(L) local V, j, n, k;
n:= LinearAlgebra:-Dimension(L);
V:= L;
for j from n to 1 by -1 do
V[j]:= V[j]+1;
if j > 1 then if V[j] = V[j-1] then V[j]:= V[j]+1 fi
elif member(V[j], [2, 8]) then V[j]:= V[j]+1
elif member(V[j], [4, 5, 6]) then V[j]:= 7
fi;
if V[j] <= 9 then
for k from j+1 to n do if (k-j)::odd then V[k]:= 0 else V[k]:= 1 fi od;
return V
fi;
od;
Vector(n+1, i -> i mod 2)
end proc:
Pali:= proc(L)
local i, n;
n:= LinearAlgebra:-Dimension(L);
add(L[i]*10^(2*n-i-1), i=1..n)+add(L[i]*10^(i-1), i=1..n-1)
end proc:
V:= <5>: Res:= 2, 3, 5: count:= 3:
while count < 100 do
V:= nextL(V);
x:= Pali(V);
if isprime(x) then count:= count+1; Res:= Res, x fi;
od:
Res; # Robert Israel, Feb 07 2019
MATHEMATICA
Select[Prime[Range[3280]], Reverse[x=IntegerDigits[#]]==x&&FreeQ[Differences[x], 0]&] (* Jayanta Basu, Jun 01 2013 *)
CROSSREFS
Sequence in context: A092909 A080437 A092908 * A030150 A343675 A029977
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Sep 15 1999
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 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)