[n for n in xrangerange(3, 10**4) if isprime(int(''.join([str(d) for d in xrangerange(2, n) if n%d and 2*n%d in [d-1, 0, 1]])))] # Chai Wah Wu, Aug 08 2014
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
[n for n in xrangerange(3, 10**4) if isprime(int(''.join([str(d) for d in xrangerange(2, n) if n%d and 2*n%d in [d-1, 0, 1]])))] # Chai Wah Wu, Aug 08 2014
Klaus Brockhaus <a href="/A191647/b191647_2.txt">Table of n, a(n) for n = 1..1000</a> (first 250 terms from Paolo P. Lava)
editing
approved
Corrected a(618) corrected in b-file by Paolo P. Lava, Feb 28 2018
Paolo P. Lava and Klaus Brockhaus <a href="/A191647/b191647_2.txt">Table of n, a(n) for n = 1..1000</a> (first 250 terms from Paolo P. Lava)
proposed
editing
editing
proposed
with(numtheory):
P:=proc(i) local a, b, c, d, k, n, s, v; v:=array(1..200000);
local a, b, c, d, k, n, s, v;
v:=array(1..200000);
for n from 3 by 1 to i do k:=2; b:=0;
while k<n do if (k:= mod 2; b:)=0; then
while k<n do
if (k mod 2)=0 then
if (n mod k)>0 and (((2*n-1) mod k)=0 or ((2*n+1) mod k)=0) then b:=b+1; v[b]:=k; fi;
fi;
b:=b+1; v[b]:=k; fi; fi; k:=k+1; od; a:=v[1];
od;
a:=v[1];
od; end: P(10^6);
end:
P(2000);
Corrected b-file by Paolo P. Lava, Feb 28 2018
Paolo P. Lava, and Klaus Brockhaus <a href="/A191647/b191647_2.txt">Table of n, a(n) for n = 1..1000</a>
Paolo P. Lava and Klaus Brockhaus, , <a href="/A191647/b191647_2.txt">Table of n, a(n) for n = 1..1000</a>
approved
editing