Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
A217065 Primes that remain prime when a single "7" digit is inserted between any two adjacent digits. 9
13, 19, 67, 73, 97, 277, 367, 379, 421, 433, 487, 541, 691, 757, 853, 967, 1117, 1471, 1747, 2017, 2617, 2749, 2851, 2953, 3463, 3529, 3571, 4507, 5077, 5923, 6073, 6079, 6343, 6481, 6577, 6709, 6829, 6967, 7351, 7417, 7573, 7681, 8317, 8719, 9157, 9649, 13177 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..422 (* First 118 terms from Paolo P. Lava *)
EXAMPLE
311683 is prime and also 3116873, 3116783, 3117683, 3171683 and 3711683.
MAPLE
with(numtheory);
A217065:=proc(q, x)
local a, b, c, i, n, ok;
for n from 5 to q do
a:=ithprime(n); b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=ithprime(n); ok:=1;
for i from 1 to b-1 do
c:=a+9*10^i*trunc(a/10^i)+10^i*x; if not isprime(c) then ok:=0; break; fi; od;
if ok=1 then print(ithprime(n)); fi; od; end:
A217065(1000000, 7);
MATHEMATICA
Select[Prime[Range[5, 1600]], AllTrue[FromDigits/@Table[Insert[ IntegerDigits[ #], 7, i], {i, 2, IntegerLength[#]}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 12 2016 *)
PROG
(PARI) is(n)=my(v=concat([""], digits(n))); for(i=2, #v-1, v[1]=Str(v[1], v[i]); v[i]=7; if(i>2, v[i-1]=""); if(!isprime(eval(concat(v))), return(0))); isprime(n) \\ Charles R Greathouse IV, Sep 26 2012
CROSSREFS
Sequence in context: A109504 A122042 A291862 * A339917 A174343 A158332
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Sep 26 2012
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 August 18 19:26 EDT 2024. Contains 375273 sequences. (Running on oeis4.)