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-10 of 17 results. Next

A080715 Numbers k such that for any positive integers (a, b), if a * b = k then a + b is prime.

Original entry on oeis.org

1, 2, 6, 10, 22, 30, 42, 58, 70, 78, 82, 102, 130, 190, 210, 310, 330, 358, 382, 442, 462, 478, 562, 658, 742, 838, 862, 970, 1038, 1222, 1282, 1318, 1618, 1810, 1870, 1978, 2038, 2062, 2098, 2242, 2398, 2458, 2578, 2902, 2938, 2962, 3018, 3082, 3322, 3642, 3862, 4218, 4258, 4282, 4678, 5098, 5590, 5938, 6042, 6078
Offset: 1

Views

Author

Matthew Vandermast, Mar 23 2003

Keywords

Comments

Sequence includes all even, squarefree "idoneal" or "convenient" numbers (A000926); all members are even and squarefree except 1 (which is also idoneal).
Is it known, or can it be proved, that this sequence is infinite?
Let p and p+2 be twin primes. If 2p+1 is also prime, 2p is in this sequence. - T. D. Noe, Jun 06 2006, Nov 26 2007
2*A045536 are the n with two prime factors. 2*A128279 are the n with three prime factors. 2*A128278 are the n with four prime factors. 2*A128277 are the n with five prime factors. 2*A128276 lists the least n having k prime factors. - T. D. Noe, Nov 14 2010
Numbers n such that d + n/d is prime for every d|n. Then n+1 is a prime p = 2 or p == 3 (mod 4). - Thomas Ordowski, Apr 12 2013

Examples

			1 is the product of two positive integers in one way: 1 * 1. The sum of the multiplicands is 2, which is prime.
310 (2*5*31) is the product of two positive integers in 4 ways: 1 * 310, 2 * 155, 5 * 62 and 10 * 31. The sums of the pairs of multiplicands are 311, 157, 67 and 41, respectively; all are primes.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.

Crossrefs

Programs

  • Haskell
    a080715 n = a080715_list !! (n-1)
    a080715_list = 1 : filter (\x -> all ((== 1) . a010051) $
       zipWith (+) (a027750_row x) (reverse $ a027750_row x)) [2,4..]
    -- Reinhard Zumkeller, Apr 12 2012
    
  • Mathematica
    t={}; Do[ds=Divisors[n]; If[EvenQ[Length[ds]], ok=True; k=1; While[k<=Length[ds]/2 && (ok=PrimeQ[ds[[k]]+ds[[ -k]]]), k++ ]; If[ok, AppendTo[t,n]]], {n,2,4000}]; t (* T. D. Noe, Jun 06 2006 *)
    Select[Range[10^4], (d=Divisors[#]; And@@PrimeQ[d + # / d])&] (* Vincenzo Librandi, Jul 14 2017 *)
  • PARI
    is_ok(n)=fordiv(n,d,if(!isprime(d+n/d),return(0)));return(1);
    for(n=1,10^4,if(is_ok(n),print1(n,", "))); \\ Joerg Arndt, Jul 10 2014

A120806 Positive integers k such that k+d+1 is prime for all divisors d of k.

Original entry on oeis.org

1, 3, 5, 9, 11, 29, 35, 39, 41, 65, 125, 179, 191, 239, 281, 419, 431, 641, 659, 749, 755, 809, 905, 935, 989, 1019, 1031, 1049, 1229, 1289, 1451, 1469, 1481, 1829, 1859, 1931, 2129, 2141, 2339, 2519, 2549, 2969, 3161, 3299, 3329, 3359, 3389, 3539, 3821, 3851
Offset: 1

Views

Author

Walter Kehowski, Jul 06 2006

Keywords

Comments

No a(n) can be even, since a(n)+2 must be prime. If a(n) is a prime, then it is a Sophie Germain twin prime (A045536). The only square is 9. Let the degree of n be the sum of the exponents in its prime factorization. By convention, degree(1)=0. Then every a(n) has degree less than or equal to 3. Let the weight of n be the number of its distinct prime factors. By convention, weight(1)=0. Clearly, w<=d is always true, with d=w only when the number is squarefree. Let [w,d] be the set of all integers with weight w and degree d. Then only the following possibilities occur: 1. [0,0] => a(1)=1. 2. [1,1] => Sophie Germain twin prime: 3, 5, 11, 29, A005384, A045536. 3. [1,2] => a(4)=9 is the only occurrence. 4. [1,3] => 5^3, 71^3 and 303839^3 are the first few cubes, A000578, A120808. 5. [2,2] => 5*7, 3*13 and 5*13 are the first few semiprimes, A001358, A120807. 6. [2,3] => 11*13^2, 61^2*89 and 13^2*12671 are the first few examples, A014612, A054753, A120809. 7. [3,3] => 5*11*17, 5*53*1151, 5*11*42533 are the first few 3-almost primes, A007304, A120810.

Examples

			a(11) = 125 since divisors(125) = {1, 5, 25, 125} and the set of all n+d+1 is {127, 131, 151, 251} and these are all primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory); L:=[1]: for w to 1 do for k from 1 to 12^6 while nops(L)<=1000 do x:=2*k+1; if andmap(isprime,[x+2,2*x+1]) then S:=divisors(x) minus {1,x}; Q:=map(z-> x+z+1, S); if andmap(isprime,Q) then L:=[op(L),x]; print(nops(L),ifactor(x)); fi; fi; od od; L;
  • Mathematica
    q[k_] := AllTrue[Divisors[k], PrimeQ[k + # + 1] &]; Select[Range[5000], q] (* Amiram Eldar, Aug 05 2024 *)
  • PARI
    is(n)=fordiv(n,d,if(!isprime(n+d+1),return(0)));1; \\ Joerg Arndt, Nov 07 2015

A106057 Primes p such that 1*p + 4 and 4*p + 1 are primes.

Original entry on oeis.org

3, 7, 13, 37, 43, 67, 79, 97, 127, 163, 193, 277, 307, 487, 499, 673, 739, 853, 883, 1087, 1093, 1297, 1423, 1429, 1549, 1567, 1579, 1597, 1663, 2293, 2437, 2683, 2953, 3037, 3163, 3457, 3793, 3907, 3943, 4447, 4519, 4729, 4789, 4999, 5503, 5527, 5569, 5653
Offset: 1

Views

Author

Zak Seidov, May 07 2005

Keywords

Crossrefs

Cf. A045536 (primes p such that 1*p + 2 and 2*p + 1 are primes).
Intersection of A023200 and A023212. - Michel Marcus, Jan 20 2018

Programs

  • Magma
    [p: p in PrimesUpTo(100000)| IsPrime(p+4) and IsPrime(4*p+1)]; // Vincenzo Librandi, Nov 13 2010
  • Mathematica
    Select[Prime[Range[220]], PrimeQ[4#+1]&&PrimeQ[1#+4]&]

Extensions

More terms from Vincenzo Librandi, Apr 01 2010

A120776 Composite numbers k such that k+d+1 is prime for all divisors d of k greater than 1.

Original entry on oeis.org

8, 9, 35, 39, 65, 119, 125, 219, 341, 515, 749, 755, 905, 935, 989, 1043, 1119, 1343, 1355, 1469, 1649, 1829, 1859, 2519, 3005, 3161, 3563, 3953, 4193, 4269, 4359, 4613, 4685, 4769, 4859, 5123, 5165, 5249, 5585, 5699, 5723, 6005, 6059, 6239, 6629, 6879
Offset: 1

Views

Author

Walter Kehowski, Jul 05 2006

Keywords

Comments

The sequence could begin with 1 by convention. The sequence in which d can be 1 is a subsequence. The elements are assumed composite so as to exclude the Sophie Germain primes (A005384) and (A045536). All terms except 8 and 9 are odd numbers in squarefree semiprimes (A006881) or 3-almost-primes (A014612). The only square is 9, the first few cubes are 8, 125, 357911=71^3, 6967871=191^3 and the first few 3-almost primes are 935=5*11*17, 1859=11*13^2, 11123=7^2*227, 305015=5*53*1151. The first 3-almost-prime divisible by 9 is 149049=3^2*16561. All elements not divisible by 3 are 5 or 11 mod 12. I have been unable to find an element with more than 3 prime factors. If one exists, it must be very large. One reason is that the number of divisors grows rapidly with the number of factors. For example, if n is squarefree with k factors, then tau(n)=2^k. The condition that the 2^k-1 numbers n+d+1 be prime is then quite strong. Another reason is that one or more of the numbers n+d+1 may always be composite. For example, if n=p^5, p prime, then both p^5+p^4+1 and p^5+p+1 are composite.

Examples

			a(9)=935=5*11*17 since the divisors d greater than one are {5,11,17,55,85,187,935} and all elements in the set of n+d+1, {941,947,953,991,1021,1123,1871}, are primes.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=[]: for w to 1 do for k from 2 do #start at 1, get first element 1 if not isprime(k) and isprime(2*k+1) then S:=divisors(k) minus {1,k}; Q:=map(z-> z+k+1, S); if andmap(isprime,Q) then P:=[op(P),k]; print(nops(P),k,ifactor(k)) fi; fd:=fopen("C:/temp/n+d+1=prime-1st-1000.txt",APPEND); fprintf(fd,"%d ",x); fclose(fd); if nops(P)=1000 then break fi; fi; od od;
  • Mathematica
    Select[Range[7000],CompositeQ[#]&&AllTrue[#+1+Rest[Divisors[#]],PrimeQ]&] (* Harvey P. Dale, Mar 14 2023 *)
  • PARI
    is(n)=if(isprime(n)||n<8, return(0)); fordiv(n, d, if(!isprime(n+d+1), return(0))); 1 \\ Charles R Greathouse IV, Feb 05 2017

A176821 List of 4-tuples of twin primes q, p, p+2 and q+2 such that 2*q

Original entry on oeis.org

5, 11, 13, 7, 29, 59, 61, 31, 659, 1319, 1321, 661, 809, 1619, 1621, 811, 2129, 4259, 4261, 2131, 2549, 5099, 5101, 2551, 3329, 6659, 6661, 3331, 3389, 6779, 6781, 3391, 5849, 11699, 11701, 5851, 6269, 12539, 12541, 6271, 10529, 21059, 21061, 10531
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 26 2010, May 01 2010, May 07 2010

Keywords

Comments

The first number q in each quadruplet is in A069142 (equivalent to selecting twin primes q which are also Sophie-Germain primes). [From R. J. Mathar, May 06 2010]

Crossrefs

Extensions

Corrected (2131 replaced by 3331) by R. J. Mathar, May 06 2010

A120811 Positive integers n such that n+d+1 is prime for all proper divisors d of n. Generalization of twin prime to all integers.

Original entry on oeis.org

3, 5, 9, 11, 17, 27, 29, 35, 39, 41, 59, 65, 71, 101, 107, 125, 137, 149, 179, 191, 197, 227, 237, 239, 269, 281, 305, 311, 347, 417, 419, 431, 437, 461, 521, 569, 597, 599, 617, 641, 659, 671, 749, 755, 809, 821, 827, 857, 881, 905, 935, 989, 1019, 1031, 1049
Offset: 1

Views

Author

Walter Kehowski, Jul 07 2006

Keywords

Comments

This sequence (A120811) is a generalization of twin prime (A001359), the sequence A120776 is a generalization of Sophie Germain prime (A005384), while A120806 is the generalization of Sophie Germain twin prime (A045536). The same observations apply to A120811 as to A120806: the elements are (a) twin primes, (b) semiprimes pq, (c) 3-almost-primes, (d) 4-almost-primes. Moreover, the sequence includes all twin primes but in (b), (c) and (d) the containments are proper. The first occurrence of (d) is A120811(3980)=3^3*13147. Any others? A120811 CONJECTURE: These are all the elements, that is, no element of A120811 has more than 3 prime factors with no degree (sum of exponents) higher than 4.

Examples

			a(6)=27 since proper divisors={1,3,3^2} and 27+d+1={29,31,37} are all prime.
a(3980)=3^3*13147 since proper divisors={1,3,3^2,3^3,13147,3*13147,3^2*13147} and a(3980)+d+1={354971,354973,354979,354997,368117,394411,473293} are all prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory); L:=[]: for w to 1 do for k from 1 while nops(L)<=5000 do x:=2*k+1; if isprime(x+2) then S:=divisors(x) minus {x}; Q:=map(z-> x+z+1, S); if andmap(isprime,Q) then fd:=fopen("C:/temp/n+d+1=prime-lower.txt",APPEND); fprintf(fd,"%d",x); fclose(fd); L:=[op(L),x]; print(nops(L),ifactor(x)); fi; #Q fi; #x od od;
  • Mathematica
    Select[Range[2,1100],AllTrue[#+Most[Divisors[#]]+1,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 22 2020 *)

Formula

a(n)=n-th number such that n+d+1 is prime for all proper divisors d of n.

A128278 an=n-th smallest integer m=p1*p2*p3, product of 3 odd primes such that d+2m/d are all primes for d dividing 2m.

Original entry on oeis.org

105, 165, 231, 935, 2109, 2795, 3021, 3819, 6981, 7205, 11285, 12341, 13101, 16419, 17549, 19839, 21749, 21995, 26391, 31229, 31269, 46631, 62651, 63645, 65391, 76155, 77585, 100955, 110811, 113555, 118031, 136451, 148359, 150245, 154679
Offset: 1

Views

Author

Kok Seng Chua (chuakokseng(AT)hotmail.com), Mar 05 2007

Keywords

Examples

			E.g. 105=3.5.7, 2.3.5.7+1=211, 2+3.5.7=107, 3+2.5.7=73, 5+2.3.7=47, 7+2.3.5=37, 2.3+5.7=41, 2.5+3.7=31, 2.7+3.5=29 are all primes and 3.5.7 is the smallest such number, so a(1)=105.
		

Crossrefs

A128279 an=n-th smallest integer of the form m=p1*p2 where pi are odd primes such that d+2m/d are all primes for d dividing 2m.

Original entry on oeis.org

15, 21, 35, 39, 51, 65, 95, 155, 221, 329, 371, 485, 519, 611, 905, 989, 1121, 1199, 1469, 1509, 1541, 1661, 1821, 3039, 3189, 3431, 3641, 3791, 4055, 4109, 4281, 4601, 4859, 5079, 5111, 5195, 5331, 5429, 5579, 5951, 5979, 6161, 6245, 6731, 6881, 7415
Offset: 1

Views

Author

Kok Seng Chua (chuakokseng(AT)hotmail.com), Mar 05 2007

Keywords

Examples

			E.g. 35=5.7, 2.5.7+1=71, 2.5+7=17, 2.7+5=19. 5.7+2=37 are all primes and this is the 3rd such number, so a(3)=35
		

Crossrefs

A155188 Sophie Germain primes that are also strong primes and lesser of twin prime pairs.

Original entry on oeis.org

11, 29, 41, 179, 191, 239, 281, 419, 431, 641, 659, 809, 1019, 1031, 1049, 1229, 1289, 1451, 1481, 1931, 2129, 2141, 2339, 2549, 2969, 3299, 3329, 3359, 3389, 3539, 3821, 3851, 4019, 4271, 4481, 5231, 5279, 5441, 5501, 5639, 5741, 5849, 6131, 6269, 6449
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];If[p1>(p0+p2)/2,If[PrimeQ[p1*2+1],If[PrimeQ[p1+2],AppendTo[lst,p1]]]],{n,7!}];lst

A227920 Number of ways to write n = x + y + z with y and z distinct and greater than x such that 6*x-1, 6*y-1, 6*x*y-1 are Sophie Germain primes and {6*x-1, 6*x+1}, {6*z-1, 6*z+1}, {6*x*z-1, 6*x*z+1} are twin prime pairs.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 1, 3, 1, 2, 4, 1, 3, 1, 3, 4, 1, 4, 2, 5, 4, 1, 4, 4, 3, 5, 1, 3, 2, 3, 8, 2, 6, 4, 4, 7, 2, 6, 5, 3, 8, 2, 6, 6, 3, 10, 2, 8, 4, 4, 10, 2, 9, 4, 4, 6, 1, 7, 4, 4, 8, 5, 3, 6, 4, 7, 1, 3, 5, 2, 10, 3, 7, 5, 3, 11, 3, 9, 4, 5, 6, 1, 7, 5, 5, 9, 4, 6, 4, 6, 9, 2, 5, 4, 3, 5, 2, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 08 2013

Keywords

Comments

By part (i) of the conjecture in the comments in A227923, for any integer n > 5 not equal to 14 we have a(n) > 0, because there are distinct positive integers x, y, z with x = 1 such that 6*x-1, 6*y-1, 6*x*y-1 are Sophie Germain primes and {6*x-1, 6*x+1}, {6*z-1, 6*z+1}, {6*x*z-1, 6*x*z+1} are twin prime pairs.
Conjecture: Any integer n > 2 can be written as x + y + z (x, y, z > 0) such that 6*x-1, 6*y-1, 6x*y-1, 6*z-1 are Sophie Germain primes, and {6*x-1, 6*x+1}, and {6*y-1, 6*y+1} are twin prime pairs.

Examples

			a(14) = 1 since 14 = 2 + 7 + 5, and 6*2-1 = 11, 6*7-1 = 41, 6*2*7-1 = 83 are Sophie Germain primes, and {6*2-1, 6*2+1} ={11, 13}, {6*5-1, 6*5+1} = {29, 31}, {6*2*5-1, 6*2*5+1} = {59, 61} are twin prime pairs.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=PrimeQ[6n-1]&&PrimeQ[12n-1]
    TQ[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]
    RQ[n_]:=TQ[n]&&PrimeQ[12n-1]
    a[n_]:=Sum[If[RQ[i]&&SQ[j]&&SQ[i*j]&&TQ[n-i-j]&&TQ[i(n-i-j)]&&Abs[n-i-2j]>0,1,0],{i,1,n/3-1},{j,i+1,n-1-2i}]
    Table[a[n],{n,1,100}]
Showing 1-10 of 17 results. Next