cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A192281 Prime numbers whose anti-divisors are all prime numbers.

Original entry on oeis.org

5, 7, 11, 17, 19, 29, 43, 47, 61, 71, 79, 89, 101, 107, 109, 151, 191, 197, 223, 251, 271, 317, 349, 359, 421, 439, 461, 521, 569, 601, 631, 659, 673, 691, 701, 719, 811, 821, 881, 911, 919, 947, 971, 991, 1009, 1051, 1091, 1109, 1153, 1181, 1217, 1231
Offset: 1

Views

Author

Paolo P. Lava, Jul 15 2011

Keywords

Examples

			Anti-divisors of 109 are 2, 3, 7, 31, 73 that are all prime numbers
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    P:=proc(i)
    local a,b,c,k,j,n,ok;
    for n from 3 by 1 to i do
      j:=ithprime(n); a:={};
       for k from 2 to j-1 do
         if abs((j mod k)- k/2) < 1 then a:=a union {k}; fi;
       od;
       b:=nops(a); c:=op(a);
       if b>1 then
         ok:=1;
         for k from 1 to b do
           if (not isprime(c[k])) then ok:=0; break; fi;
         od;
         if ok=1 then print(j); fi;
       else
         if isprime(op(a)) then print(j); fi;
       fi;
    od;
    end: