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-2 of 2 results.

A140775 Numbers k > 1 such that p + k/p is prime for every prime p that divides k.

Original entry on oeis.org

2, 6, 10, 22, 30, 34, 42, 58, 70, 78, 82, 102, 118, 130, 142, 190, 202, 210, 214, 274, 298, 310, 322, 330, 358, 382, 394, 442, 454, 462, 478, 510, 538, 562, 582, 610, 622, 658, 694, 714, 730, 742, 790, 838, 862, 922, 930, 970, 1002, 1038, 1042, 1110, 1138, 1198
Offset: 1

Views

Author

Leroy Quet, May 29 2008

Keywords

Comments

All terms of this sequence are even and squarefree.
The only term == 2 (mod 3) is 2. - Robert Israel, Jan 09 2024

Examples

			The primes dividing 70 are 2, 5, 7. Now, 2 + 70/2 = 37; 5 + 70/5 = 19; 7 + 70/7 = 17. Since 37, 19 and 17 are each prime, then 70 is included in this sequence.
		

Crossrefs

Programs

  • Maple
    filter:= t -> andmap(p -> isprime(p+t/p), numtheory:-factorset(t)):
    select(filter, [seq(i,i=2..2000,4)]); # Robert Israel, Jan 09 2024
  • Mathematica
    fQ[n_] := Block[{p = First@ Transpose@ FactorInteger@ n}, Union@ PrimeQ[p + n/p] == {True}]; Select[ Range[2, 1221], fQ@# &] (* Robert G. Wilson v, May 30 2008 *)
    pnpQ[n_]:=AllTrue[#+n/#&/@Transpose[FactorInteger[n]][[1]],PrimeQ]; Select[ Range[2,1200],pnpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 15 2016 *)

Extensions

More terms from Robert G. Wilson v, May 30 2008
Definition edited by Robert Israel, Jan 09 2024

A140777 a(n) = 2*prime(n) - 4.

Original entry on oeis.org

0, 2, 6, 10, 18, 22, 30, 34, 42, 54, 58, 70, 78, 82, 90, 102, 114, 118, 130, 138, 142, 154, 162, 174, 190, 198, 202, 210, 214, 222, 250, 258, 270, 274, 294, 298, 310, 322, 330, 342, 354, 358, 378, 382, 390, 394, 418, 442, 450, 454, 462, 474, 478, 498, 510, 522
Offset: 1

Views

Author

Leroy Quet, May 29 2008, May 31 2008

Keywords

Comments

A number n is included if (p + n/p) is prime, where p is the smallest prime that divides n. Since all terms of this sequence are even (or otherwise p + n/p would be even and not a prime), p is always 2. So this sequence is the set of all even numbers n where (2 + n/2) is prime.
The entries are also encountered via the bilinear transform approximation to the natural log (unit circle). Specifically, evaluating 2(x-1)/(x+1) at x = 2, 3, 4, ..., the terms of this sequence are seen ahead of each new prime encountered. Additionally, the position of those same primes will occur at the entry positions. For clarity, the evaluation output is 2, 3, 1, 1, 6, 5, 4, 3, 10, 7, 3, 2, 14, 9, 8, 5, 18, 11, ..., where the entries ahead of each new prime are 2, 6, 10, 18, ... . As an aside, the same mechanism links this sequence to A165355. - Bill McEachen, Jan 08 2015
As a follow-up to previous comment, it appears that the numerators and denominators of 2(x-1)/(x+1) are respectively given by A145979 and A060819, but with different offsets. - Michel Marcus, Jan 14 2015
Subset of the union of A017641 & A017593. - Michel Marcus, Sep 01 2020

Examples

			The smallest prime dividing 42 is 2. Since 2 + 42/2 = 23 is prime, 42 is included in this sequence.
		

Crossrefs

Programs

  • Magma
    [2*NthPrime(n)-4: n in [1..80]]; // Vincenzo Librandi, Feb 19 2015
  • Maple
    A020639 := proc(n) local dvs,p ; dvs := sort(convert(numtheory[divisors](n),list)) ; for p in dvs do if isprime(p) then RETURN(p) ; fi ; od: error("%d",n) ; end: A111234 := proc(n) local p ; p := A020639(n) ; p+n/p ; end: isA140777 := proc(n) RETURN(isprime(A111234(n))) ; end: for n from 2 to 1200 do if isA140777(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, May 31 2008
    seq(2*ithprime(i)-4, i=1..1000); # Robert Israel, Jan 09 2015
  • Mathematica
    fQ[n_] := Block[{p = First@ First@ Transpose@ FactorInteger@ n}, PrimeQ[p + n/p] == True]; Select[ Range[2, 533], fQ@# &] (* Robert G. Wilson v, May 30 2008 *)
    Table[2 Prime[n] - 4, {n, 60}] (* Vincenzo Librandi, Feb 19 2015 *)
  • PARI
    vector(100, n, 2*prime(n) - 4) \\ Michel Marcus, Jan 09 2015
    

Formula

a(n) = 2*A040976(n). - Michel Marcus, Jan 09 2015

Extensions

More terms from Robert G. Wilson v and R. J. Mathar, May 30 2008
Showing 1-2 of 2 results.