OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
StackExchange, Even numbers greater than 6 as sum of two specific primes
MATHEMATICA
mx = 1000; safe = Select[Prime[Range[PrimePi[mx]]], PrimeQ[(# - 1)/2] &]; p = Prime[Range[2, PrimePi[mx]]]; Complement[Range[2, mx, 2], Union[Flatten[Outer[Plus, p, t]]]] (* T. D. Noe, Sep 15 2011 *)
PROG
#!/usr/bin/perl
$| = 1;
sub is_prime {
my $n = shift;
return 0 if $n < 2;
return 1 if $n == 2;
return 0 unless $n % 2;
my $sn = int(sqrt($n));
for (my $j = 3; $j <= $sn; $j += 2) {
return 0 if $n % $j == 0;
}
return 1;
}
my $n = 0;
while (1) {
++$n;
next if $n % 2;
my $found = 0;
for my $p (3 .. $n) {
next unless $p % 2;
my $q = $n - $p;
next unless $q % 2;
next unless is_prime($p);
next unless is_prime($q);
next unless is_prime(($p - 1) / 2) || is_prime(($q - 1) / 2);
$found = 1;
last;
}
print "$n\n" unless $found;
}
(Haskell)
a195324 n = a195324_list !! (n-1)
a195324_list = filter p [2, 4..] where
p n = all ((== 0) . a010051) $ takeWhile (> 1) $ map (n -) a005385_list
-- Reinhard Zumkeller, Sep 18 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Dan Brumleve, Sep 15 2011
STATUS
approved