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

A120807 Cubes k in A120806: k+d+1 is prime for all divisors d of k. All cubes greater than 1 are cubes of odd primes.

Original entry on oeis.org

1, 125, 357911, 28049850707778719, 1093838138707598549, 2498288375480240699, 2971816820123565959, 11368298790243739889, 14106863174732461979, 17104690428464397149, 21904077634699214681, 64352051556875937161, 82512915197756439761, 115892432166552995771, 231193025116112162501
Offset: 1

Views

Author

Walter Kehowski, Jul 06 2006

Keywords

Examples

			a(3) = 357911 since k = 357911 = 71^3, divisors(k) = {1, 71, 71^2, 71^3} and k+d+1 = {357913, 357983, 362953, 715823} are all primes.
		

Crossrefs

Intersection of A000578 and A120806.
Cf. A120808.

Programs

  • Maple
    L:=[]: for w to 1 do for k from 1 while nops(L)<=50 do p:=ithprime(k); x:=p^3; if p mod 6 = 5 and andmap(isprime,[x+2,2*x+1]) then S:={p,p^2}; Q:=map(z-> x+z+1, S); if andmap(isprime,Q) then L:=[op(L),x]; print(nops(L),p,x); fi; fi; od od;
  • Mathematica
    Select[Range[4008000]^3,AllTrue[#+Divisors[#]+1,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 26 2019 *)
  • PARI
    lista(kmax) = {my(f, k3, is); forstep(k = 1, kmax, 2, f = factor(k); k3 = k^3; for(i = 1, #f~, f[i, 2] *= 3); is = 1; fordiv(f, d, if(!isprime(k3 + d + 1), is = 0; break)); if(is, print1(k3, ", ")));} \\ Amiram Eldar, Aug 05 2024

Extensions

a(13)-a(15) from Amiram Eldar, Aug 05 2024

A120808 Integers p such that x = p^3 is in A120806: x+d+1 is prime for all divisors d of x. All p greater than 1 are odd primes.

Original entry on oeis.org

1, 5, 71, 303839, 1030349, 1356899, 1437719, 2248529, 2416259, 2576549, 2797961, 4007321, 4353521, 4875491, 6137501, 6611441, 6698831, 6904421, 7821791, 8078981, 9221231, 9311279, 9500279, 10157309, 11251421, 11879939, 11957969, 12040751, 13906649, 15299021, 16043369
Offset: 1

Views

Author

Walter Kehowski, Jul 06 2006

Keywords

Examples

			a(3) = 71 since x = 71^3 = 357911, divisors(x) = {1, 71, 71^2, 71^3} and x+d+1 = {357913, 357983, 362953, 715823} are all primes.
		

Crossrefs

Programs

  • Maple
    L:=[]: for w to 1 do for k from 1 while nops(L)<=50 do p:=ithprime(k); x:=p^3; if p mod 6 = 5 and andmap(isprime,[x+2,2*x+1]) then S:={p,p^2}; Q:=map(z-> x+z+1, S); if andmap(isprime,Q) then L:=[op(L),x]; print(nops(L),p,x); fi; fi; od od;
  • PARI
    is(k) = {my(x=k^3); k == 1 || (isprime(k) && isprime(x+2) && isprime(x+k+1) && isprime(x+k^2+1) && isprime(2*x+1));} \\ Amiram Eldar, Aug 05 2024

Formula

a(1) = 1. a(n) = p where p is the (n-1)-st prime such that x = p^3 is in A120806: x+d+1 is prime for all divisors d of x.

Extensions

a(28)-a(31) from Amiram Eldar, Aug 05 2024

A120809 Integers of the form p^2*q in A120806: x+d+1 is prime for all divisors d of x. Both p and q are odd primes, with p and q distinct. See A054753.

Original entry on oeis.org

1859, 331169, 2141399, 4641629, 6633419, 8447039, 10338119, 13526009, 20163059, 21603425, 24099569, 26187119, 26483321, 28226549, 33379569, 33485139, 40790009, 50139819, 52046075, 56152179, 57170075, 59824925, 72541799, 81638579, 104151839, 106624359, 106791269
Offset: 1

Views

Author

Walter Kehowski, Jul 06 2006

Keywords

Examples

			a(1) = 1859 since x = 11*13^2, divisors(x) = {1, 11, 13, 11*13, 13^2, 11*13^2} and x+d+1 = {1861, 1871, 1873, 2003, 2029, 3719} are all primes.
		

Crossrefs

Intersection of A054753 and A120806.

Programs

  • Maple
    with(numtheory); is3almostprime := proc(n) local L; if n in [0,1] or isprime(n) then return false fi; L:=ifactors(n)[2]; if nops(L) in [1,2,3] and convert(map(z-> z[2], L), `+`) = 3 then return true else return false fi; end; L:=[]: for w to 1 do for k from 1 while nops(L)<=50 do x:=2*k+1; y:=simplify(x^(1/3)); if x mod 6 = 5 and not type(y,integer) #clunky and not issqrfree(x) and is3almostprime(x) and andmap(isprime,[x+2,2*x+1]) then S:=divisors(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;
  • PARI
    is(n) = my(f); if(!(n%2), return(0)); f = factor(n); if(f[,2] != [1,2]~ && f[,2] != [2,1]~, return(0)); fordiv(f, d, if(!isprime(n + d + 1), return(0))); 1; \\ Amiram Eldar, Aug 05 2024

Extensions

a(2) corrected and a(24)-a(27) added by Amiram Eldar, Aug 05 2024

A120810 Integers x of the form p*q*r in A120806: x+d+1 is prime for all divisors d of x, where p, q and r are distinct odd primes. See A007304.

Original entry on oeis.org

935, 305015, 2339315, 3690185, 14080121, 14259629, 16143005, 17754869, 18679409, 26655761, 29184749, 47372135, 80945699, 82768529, 87102509, 123581021, 131225889, 141328979, 177392861, 224285529, 289174109, 348095519, 350342279, 359093699, 372823805, 403685135
Offset: 1

Views

Author

Walter Kehowski, Jul 06 2006

Keywords

Examples

			a(1) = 935 since x = 935 = 5*11*17, divisors(x) = {1, 5, 11, 17, 5*11, 5*17, 11*17, 5*11*17} and x+d+1 = {937, 941, 947, 953, 991, 1021, 1123, 1871} are all primes.
		

Crossrefs

Intersection of A007304 and A120806.

Programs

  • Maple
    with(numtheory); is3almostprime := proc(n) local L; if n in [0,1] or isprime(n) then return false fi; L:=ifactors(n)[2]; if nops(L) in [1,2,3] and convert(map(z-> z[2], L), `+`) = 3 then return true else return false fi; end; L:=[]: for w to 1 do for k from 1 while nops(L)<=50 do x:=2*k+1; if x mod 6 = 5 and issqrfree(x) and is3almostprime(x) and andmap(isprime,[x+2,2*x+1]) then S:=divisors(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;
  • PARI
    is(n) = my(f); if(!(n%2), return(0)); f = factor(n); if(f[,2] != [1,1,1]~, return(0)); fordiv(f, d, if(!isprime(n + d + 1), return(0))); 1; \\ Amiram Eldar, Aug 05 2024

Extensions

a(16)-a(26) from Amiram Eldar, Aug 05 2024

A004611 Divisible only by primes congruent to 1 mod 3.

Original entry on oeis.org

1, 7, 13, 19, 31, 37, 43, 49, 61, 67, 73, 79, 91, 97, 103, 109, 127, 133, 139, 151, 157, 163, 169, 181, 193, 199, 211, 217, 223, 229, 241, 247, 259, 271, 277, 283, 301, 307, 313, 331, 337, 343, 349, 361, 367, 373, 379, 397, 403, 409, 421, 427, 433, 439, 457
Offset: 1

Views

Author

Keywords

Comments

In other words, if a prime p divides n, then p == 1 mod 3.
Equivalently, products of primes == 1 (mod 6), products of elements of A002476.
Positive integers n such that n+d+1 is divisible by 3 for all divisors d of n. For example, a(13)=91 since 91=7*13, 91+1+1=93=3*31, 91+7+1=99=9*11, 91+13+1=105=3*7*5, 91+91+1=183=3*61. The only prime p such that x+d+1 is divisible by p for all divisors d of x is p=3. The sequence consists of 1 and all integers whose prime divisors are of the form 6k+1. - Walter Kehowski, Aug 09 2006
Also z such that z^2 = x^2 + x*y + y^2 and gcd(x,y,z) = 1. - Frank M Jackson, Jul 30 2013
From Jean-Christophe Hervé, Nov 24 2013: (Start)
Apart from the first term (for all in this comment), this sequence is the analog of A008846 (hypotenuses of primitive Pythagorean triangles) for triangles with integer sides and a 120-degree angle: a(n), n>1, is the sequence of lengths of the longest side of the primitive triangles.
Not only the square of these numbers is equal to x^2 + xy + y^2 with x and y > 0, but the numbers themselves also are; the sequence starting at n=2 is then a subsequence of A024606.
(End)
Numbers n such that 3/n cannot be written as the sum of 2 unit fractions. - Carl Schildkraut, Jul 19 2016
a(n), n>1, is the sequence of lengths of the middle side b of the primitive triangles such that A < B < C with an angle B = 60 degrees (A335895). Compare with comment of Nov 24 2013 where a(n), n>1, is the sequence of lengths of the longest side of the primitive triangles that have an angle = 120 degrees. - Bernard Schott, Mar 29 2021

Crossrefs

Multiplicative closure of A002476.

Programs

  • Magma
    [n: n in [1..500] | forall{d: d in PrimeDivisors(n) | d mod 3 eq 1}]; // Vincenzo Librandi, Aug 21 2012
    
  • Maple
    with(numtheory): for n from 1 to 1801 by 6 do it1 := ifactors(n)[2]: it2 := 1: for i from 1 to nops(it1) do if it1[i][1] mod 6 > 1 then it2 := 0; break fi: od: if it2=1 then printf(`%d,`,n) fi: od:
    with(numtheory): cnt:=0: L:=[]: for w to 1 do for n from 1 while cnt<100 do dn:=divisors(n); Q:=map(z-> n+z+1, dn); if andmap(z-> z mod 3 = 0, Q) then cnt:=cnt+1; L:=[op(L),[cnt,n]]; fi; od od; L; # Walter Kehowski, Aug 09 2006
  • Mathematica
    ok[1]=True;ok[n_]:=And@@(Mod[#,3]==1&)/@FactorInteger[n][[All,1]];Select[Range[500],ok] (* Vincenzo Librandi, Aug 21 2012 *)
    lst={}; maxLen=331; Do[If[Reduce[m^2+m*n+n^2==k^2&&m>=n>=0&&GCD[k, m, n]==1, {m, n}, Integers]===False, Null[], AppendTo[lst, k]], {k, maxLen}]; lst (* Frank M Jackson, Jul 04 2013 from A034017 *)
  • PARI
    is(n)=my(f=factor(n)[,1]);for(i=1,#f,if(f[i]%3!=1,return(0)));1 \\ Charles R Greathouse IV, Feb 06 2013
    
  • PARI
    list(lim)=my(v=List([1]), mn, mx, t); forprime(p=7, lim\=1, if(p%6==1, listput(v, p))); if(lim<49, return(Vec(v))); forprime(p=7, sqrtint(lim), if(p%6>1, next); mx=1; while(v[mx+1]*p<=lim, for(i=mn=mx+1, mx=#v, t=p*v[i]; if(t>lim, break); listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Jan 11 2018

Extensions

More terms from James Sellers, Oct 30 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007

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.

A121058 Positive integers x such that x+d+1 is composite for all divisors d of x.

Original entry on oeis.org

7, 13, 19, 22, 31, 37, 42, 43, 46, 47, 49, 61, 62, 67, 73, 79, 82, 91, 97, 103, 109, 118, 121, 122, 126, 127, 133, 139, 142, 151, 157, 163, 166, 167, 169, 172, 181, 193, 199, 202, 206, 211, 212, 213, 214, 217, 218, 223, 229, 241, 242, 246, 247, 250, 256, 257
Offset: 1

Views

Author

Walter Kehowski, Aug 09 2006

Keywords

Examples

			a(9)=46=2*23 since 46+1+1=48=16*3, 46+2+1=49=7*7, 46+23+1=70=2*5*7, 46+46+1=93=3*31.
		

Crossrefs

Cf. A120806.

Programs

  • Maple
    with(numtheory): cnt:=0: L:=[]: for w to 1 do for n from 1 while cnt<100 do dn:=divisors(n); Q:=map(z-> n+z+1, dn); if andmap(z-> not isprime(z), Q) then cnt:=cnt+1; L:=[op(L),[cnt,n]]; fi; od od; L;
  • Mathematica
    Select[Range[300],AllTrue[#+1+Divisors[#],CompositeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 05 2015 *)

Formula

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

A153326 Composite numbers k such that k+1+d is prime for all nontrivial divisors d which divide k.

Original entry on oeis.org

4, 8, 9, 25, 27, 35, 39, 55, 65, 119, 125, 185, 203, 219, 235, 237, 289, 305, 319, 341, 415, 417, 437, 515, 535, 597, 649, 655, 671, 685, 749, 755, 905, 935, 959, 979, 989, 1003, 1043, 1079, 1111, 1119, 1165, 1227, 1247, 1285, 1299, 1315, 1343, 1355, 1465, 1469, 1565, 1649, 1681, 1735, 1739, 1829
Offset: 1

Views

Author

J. M. Bergot, Dec 23 2008

Keywords

Comments

4 and 8 are the only even numbers.
Numbers in the sequence which are not semiprimes: 8, 27, 125, 935, 1859, 2849, etc. - R. J. Mathar, Jan 06 2009

Examples

			For k = 8, the nontrivial divisors are 2 and 4 and (8+1) + 2 = 11 and (8+1) + 4 = 13 are both primes.
For 35 the nontrivial divisors are 5 and 7. With (35+1) + 5 = 41 and (35+1) + 7 = 43, both sums are primes.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := CompositeQ[k] && AllTrue[Divisors[k][[2 ;; -2]], PrimeQ[k + # + 1] &]; Select[Range[2000], q] (* Amiram Eldar, Aug 05 2024 *)

Formula

{k: k+1+d in A000040 for all 1 < d < k with d|k}.

Extensions

Added 4, replaced 121 by 125, extended, simplified definition, added non-semiprime examples. R. J. Mathar, Jan 06 2009

A187554 Odd nonprimes n such that n+d+1 is prime for all divisors d of n.

Original entry on oeis.org

1, 9, 35, 39, 65, 125, 749, 755, 905, 935, 989, 1469, 1829, 1859, 2519, 3161, 4269, 4859, 5165, 5699, 6005, 7319, 8309, 8759, 9155, 9869, 11129, 12819, 12851, 14141, 14279, 15539, 15899, 18689, 19859, 20019, 25115, 25535, 26679, 28049
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 26 2011

Keywords

Examples

			a(6) = 125 with divisors (1, 5, 25, 125) and the set of all n+d+1 is (127, 131, 151, 251) and these are all prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1,29001,2],!PrimeQ[#]&&AllTrue[#+Divisors[#]+1,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 21 2016 *)

Formula

A120776(a(n+1)) = A120806(a(n+1)).
Showing 1-9 of 9 results.