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.

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

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.

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