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!)
A195324 Even numbers that cannot be represented as the sum of an odd prime and a safe prime (A005385). 1
2, 4, 6, 32, 56, 92, 98, 122, 128, 140, 152, 176, 194, 212, 224, 242, 254, 260, 272, 296, 302, 308, 326, 332, 368, 392, 398, 410, 422, 434, 452, 458, 476, 488, 500, 512, 518, 524, 536, 542, 560, 572, 596, 602, 632, 644, 656, 662, 674, 686, 692, 704, 710, 728 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Cf. A000040 (primes), A005385 (safe primes).
Sequence in context: A100838 A056696 A045662 * A175877 A269265 A173818
KEYWORD
nonn
AUTHOR
Dan Brumleve, Sep 15 2011
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 14 07:36 EDT 2024. Contains 371655 sequences. (Running on oeis4.)