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!)
A078790 Palindromic primes with successive increasing difference: a(k)-a(k-1) < a(k+1)- a(k). 2
2, 5, 11, 101, 313, 727, 10301, 19891, 30103, 70207, 1003001, 1936391, 3001003, 7014107, 100030001, 193191391, 300020003, 700020007, 10000500001, 19301110391, 30000500003, 70005450007, 1000008000001, 1930022200391, 3000002000003, 7000005000007, 100000323000001 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
revdigs:= proc(x) local F, i;
F:= convert(x, base, 10);
add(F[-i]*10^(i-1), i=1..nops(F))
end proc:
f1:= proc(n)
local m0, a0, b0, m, a, b, c, x;
m0:= ilog10(n)+1;
if m0::even then m:= m0/2+1; a0:= 1; b0:= 0;
else a0:= floor(n/10^(m0-1));
if a0 = 4 or a0 = 5 then a0:= 7; b0:= 0
elif a0::odd then b0:= n - 10^(m0-1)*a0;
else a0:= a0+1; b0:= 0;
fi;
m:= ceil(m0/2); b0:= floor(b0/10^(m-1));
fi;
for a from a0 to 9 by 2 do
for b from b0 to 10^(m-1) do
x:= 10^(m-1)*a + b;
x:= 10^(m-1)*x + revdigs(floor(x/10));
if x < n then next fi;
if isprime(x) then return x fi
od;
b0:= 0;
od;
procname(10^m0);
end proc;
A[1]:= 2: A[2]:= 5: A[3]:= 11:
for n from 4 to 30 do
A[n]:= f1(2*A[n-1]-A[n-2]+1);
od:
seq(A[i], i=1..30); # Robert Israel, Jan 31 2019
MATHEMATICA
p = 1; d = 0; Do[ q = FromDigits[ Join[ IntegerDigits[n], Drop[ Reverse[ IntegerDigits[n]], 1]]]; If[ PrimeQ[q] && q - p > d, Print[q]; d = q - p; p = q], {n, 2, 3000002}]
CROSSREFS
Cf. A071250.
Sequence in context: A178318 A134996 A134998 * A158999 A283300 A069506
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Dec 03 2002
EXTENSIONS
Corrected by T. D. Noe, Oct 25 2006
Corrected and more terms from Robert Israel, Jan 31 2019
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 24 19:52 EDT 2024. Contains 371963 sequences. (Running on oeis4.)