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.

Showing 1-3 of 3 results.

A143957 An integer >= 2 is included if {the difference between the largest and smallest primes dividing n} divides n+1.

Original entry on oeis.org

6, 12, 14, 15, 18, 20, 24, 35, 36, 39, 44, 45, 48, 50, 54, 63, 72, 75, 80, 84, 96, 108, 119, 135, 143, 144, 147, 152, 153, 155, 162, 175, 192, 200, 208, 216, 224, 225, 230, 231, 242, 245, 275, 279, 288, 294, 299, 315, 320, 323, 324, 374, 375, 384, 399, 405, 429
Offset: 1

Views

Author

Leroy Quet, Sep 05 2008

Keywords

Examples

			The largest prime dividing 14 is 7. The smallest prime dividing 14 is 2. 7-2=5 divides 14+1=15. So 14 is in the sequence.
		

Crossrefs

Cf. A143958. Includes A037074.

Programs

  • Maple
    filter:= proc(n) local P;
      P:= numtheory:-factorset(n);
      if nops(P) = 1 then return false fi;
      n+1 mod (max(P)-min(P)) = 0
    end proc:
    select(filter, [$2..1000]); # Robert Israel, Nov 04 2020
  • Mathematica
    Select[Range[2, 429], If[Or[PrimeQ[#], PrimePowerQ[#]], False, Mod[#1, Last[#2] - First[#2]] == 0 & @@ {# + 1, FactorInteger[#][[All, 1]]}] &] (* Michael De Vlieger, Nov 04 2020 *)

Extensions

Extended by Ray Chandler, Nov 07 2008

A295798 a(n) is the number of divisors d of prime(n)^2 - 1 such that prime(n) + d is prime.

Original entry on oeis.org

2, 3, 5, 5, 8, 6, 7, 11, 7, 13, 13, 8, 16, 11, 7, 11, 11, 8, 9, 23, 5, 13, 9, 22, 12, 14, 15, 8, 20, 12, 20, 19, 8, 20, 14, 19, 5, 12, 10, 7, 12, 33, 24, 7, 18, 28, 20, 13, 9, 15, 21, 27, 20, 29, 12, 11, 14, 30, 5, 25, 4, 10, 33, 19, 7, 3, 12, 18, 9, 26, 13, 19, 13, 12, 40, 9, 15, 12, 24, 17, 37, 17
Offset: 1

Views

Author

Robert Israel, Nov 27 2017

Keywords

Comments

a(n) is the number of semiprimes in A143958 whose least prime factor is prime(n).
The least n for which a(n)=0 is 7511.

Examples

			For n=3, prime(3)=5; 5^2-1 has 5 divisors d such that 5+d is prime, namely 2, 6, 8, 12, 24.  Thus a(3)=5.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) nops(select(t -> isprime(p+t), numtheory:-divisors(p^2-1))) end proc:
    map(f, [seq(ithprime(i),i=1..100)]);
  • Mathematica
    Table[DivisorSum[p^2 - 1, 1 &, PrimeQ[p + #] &], {p, Prime@ Range@ 82}] (* Michael De Vlieger, Nov 27 2017 *)
  • PARI
    a(n) = sumdiv(prime(n)^2-1, d, isprime(prime(n)+d)); \\ Michel Marcus, Nov 30 2017

A295818 Primes p such that p+d is composite for all divisors d of p^2-1.

Original entry on oeis.org

76333, 80077, 106243, 115603, 155333, 175963, 224683, 279353, 281207, 299653, 309157, 312253, 314267, 318523, 361093, 413053, 428083, 526997, 533893, 573829, 580093, 605533, 625237, 637243, 655987, 661993, 706633, 708403, 716747, 723803, 737293, 740227, 741347, 741373, 766967, 775757, 776267, 776317
Offset: 1

Views

Author

Robert Israel, Nov 27 2017

Keywords

Comments

Primes n such that A295798(A000720(n)) = 0.
Primes n such that no semiprime with least prime factor n is in A143958.

Crossrefs

Programs

  • Maple
    filter:= p -> isprime(p) and andmap(t -> not isprime(p+t), numtheory:-divisors(p^2-1)):
    select(filter, [seq(i,i=3..10^6,2)]);
  • PARI
    is(n) = if(isprime(n), fordiv(n^2-1, d, if(isprime(n+d), return(0))); 1, 0) \\ Iain Fox, Nov 27 2017
    
  • PARI
    is(n)=my(o=valuation(n+1,2), f1=factor((n-1)<>o, f), f=Mat(vecsort(Vec(concat(f1~,f2~)),1))~); fordiv(f, d, if(isprime(n+d), return(0))); isprime(n) \\ Charles R Greathouse IV, Nov 28 2017
Showing 1-3 of 3 results.