login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

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

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

Cf. A000040 (primes), A005385 (safe primes).

Sequence in context: A100838 A056696 A045662 * A175877 A173818 A084324

Adjacent sequences:  A195321 A195322 A195323 * A195325 A195326 A195327

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 | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified November 22 12:54 EST 2014. Contains 249805 sequences.