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

A109909 a(n) = number of primes of the form k*(n-k)-1.

Original entry on oeis.org

0, 0, 0, 2, 2, 1, 2, 1, 4, 1, 3, 2, 3, 2, 3, 2, 4, 3, 5, 1, 10, 1, 5, 5, 4, 2, 6, 3, 5, 3, 9, 4, 11, 3, 5, 5, 5, 5, 14, 1, 6, 6, 7, 6, 11, 5, 8, 4, 15, 3, 13, 4, 10, 9, 6, 5, 11, 4, 12, 5, 13, 4, 12, 4, 6, 11, 13, 4, 12, 6, 15, 12, 9, 4, 9, 5, 10, 8, 10, 3, 28, 7, 11, 15, 6, 9, 20, 7, 20, 6, 17, 5, 23
Offset: 1

Views

Author

Amarnath Murthy, Jul 15 2005

Keywords

Comments

Conjecture: a(n) > 0 for n > 3.
Conjecture verified up to 10^9. - Mauro Fiorentini, Jul 23 2023

Crossrefs

Extensions

More terms from David Wasserman, Aug 15 2005

A026728 a(n) = number of primes of the form k*(n-k) + 1.

Original entry on oeis.org

0, 1, 1, 1, 2, 0, 3, 2, 1, 1, 4, 1, 6, 1, 1, 2, 8, 1, 5, 3, 1, 4, 7, 1, 7, 1, 4, 5, 8, 0, 10, 6, 2, 2, 7, 1, 9, 8, 4, 4, 14, 1, 16, 3, 3, 5, 12, 3, 7, 7, 4, 11, 21, 0, 11, 4, 7, 6, 11, 2, 12, 9, 7, 10, 7, 1, 22, 7, 7, 5, 17, 3, 23, 10, 2, 9, 19, 2, 19, 8, 5, 8, 23, 1, 16, 6, 4, 11, 14, 4, 16, 12, 9, 5, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 27 2004

Keywords

Comments

Number of primes of form x*y+1 with x+y=n.
For n <= 10^7, a(n) = 0 only for n = 1, 6, 30 and 54. - Robert Israel, Oct 30 2024

Examples

			a(7) = 3, 1*6 +1 = 7, 2*5 +1 = 11, 3*4 +1 = 13.
n=16: {m: m=x*y+1 and x+y=16} = {16,29,40,49,56,61,64,65} containing two primes: 29 and 61, therefore a(16)=2.
n = 7 is the only number which gives primes for all possible values of k.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      nops(select(isprime,[seq(k*(n-k)+1, k=1..n/2)]))
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 30 2024
  • Mathematica
    a[n_] := Select[(Times @@ # + 1&) /@ IntegerPartitions[n, {2}], PrimeQ] // Length;
    Array[a, 95] (* Jean-François Alcover, Aug 02 2018 *)
  • PARI
    { a(n)=local(r);r=0;for(k=1,n\2,if(isprime(k*(n-k)+1),r++));r } \\ Max Alekseyev, Oct 04 2005

Extensions

More terms from Max Alekseyev, Oct 04 2005
Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A109904 a(1) = 5. a(n+1) is the greatest prime of the form k*(a(n)-k) + 1. The least prime occurs for k = 1 and a(n+1) = a(n) in that case if no other value of k gives a prime then the sequence terminates.

Original entry on oeis.org

5, 7, 13, 43, 463, 53593, 718052371, 128899801874680399, 4153789730832965126116749598699801, 4313492281993349218329412357362100514520987205269104143837429352069
Offset: 1

Views

Author

Amarnath Murthy, Jul 15 2005

Keywords

Comments

For the first five terms k = floor(a(n)/2). k can take values from 1 to floor(a(n)/2). It is conjectured that at least one value of k, 2 <= k < floor(a(n)/2) gives a prime and the sequence is infinite.

Examples

			a(2) = 2*3 + 1 = 7, a(3) = 3*4 + 1 = 13.
		

Crossrefs

Programs

  • PARI
    { b(n)=forstep(k=n\2,1,-1,if(isprime(k*(n-k)+1),return(k*(n-k)+1)));return(0) }
    s=5;while(1,print1(s, ", ");s=b(s)) \\ Max Alekseyev, Oct 04 2005

Extensions

More terms from Max Alekseyev, Oct 04 2005

A109907 Beginning with 7, a(n+1) = greatest prime of the form k*{a(n)-k}-1. If no prime is obtained the sequence ends at that point.

Original entry on oeis.org

7, 11, 29, 197, 9689, 23469167, 137700449916401, 4740353476794815041972197893, 5617737771240172767652929826457529708578746492288409399, 7889744416604625924469156192031986939513870147397674409917489724005347434748024264638497225986334149357868007
Offset: 0

Views

Author

Amarnath Murthy, Jul 15 2005

Keywords

Comments

Conjecture: The sequence is infinite.

Crossrefs

Programs

  • PARI
    { b(n) = forstep(k=n\2,1,-1,if(isprime(k*(n-k)-1),return(k*(n-k)-1)));return(0) }
    my(s=7); while(1,print1(s,", ");s=b(s)) \\ Max Alekseyev, Oct 04 2005

Extensions

More terms from Max Alekseyev, Oct 04 2005

A109908 a(n) = greatest prime of the form k*(n-k)-1, or 0 if no such prime exists.

Original entry on oeis.org

0, 0, 0, 3, 5, 7, 11, 11, 19, 23, 29, 31, 41, 47, 53, 59, 71, 79, 89, 83, 109, 71, 131, 139, 149, 167, 181, 191, 197, 223, 239, 251, 271, 263, 293, 307, 311, 359, 379, 383, 419, 439, 461, 479, 503, 503, 521, 571, 599, 599, 647, 659, 701, 727, 743, 719, 811, 839
Offset: 1

Views

Author

Amarnath Murthy, Jul 15 2005

Keywords

Comments

Conjecture: a(n) > 0 for n > 3.
Conjecture verified up to 10^9. - Mauro Fiorentini, Jul 23 2023

Crossrefs

Programs

  • PARI
    { a(n)=forstep(k=n\2,1,-1,if(isprime(k*(n-k)-1),return(k*(n-k)-1)));return(0) } \\ Max Alekseyev, Oct 04 2005

Extensions

More terms from Max Alekseyev, Oct 04 2005
Definition corrected by David Wasserman, Oct 28 2008

A383636 Integers k such that there is no prime of the form x*y+1 with x+y=k.

Original entry on oeis.org

1, 6, 30, 54
Offset: 1

Views

Author

Michel Marcus, May 03 2025

Keywords

Comments

If k is odd, one of x or y is even. If k is even, there are cases where both x and y are odd. There is no need to check them, since we know in advance that x*y + 1 is even. - Ivan N. Ianakiev, May 04 2025
It is very likely that there are no further terms.

Crossrefs

Programs

  • Mathematica
    fQ[n_]:=If[OddQ[n],Select[Range[n/2],PrimeQ[(#*(n-#))+1]&]=={},Select[Range[2,n/2,2],PrimeQ[(#*(n-#))+1]&]=={}]; Select[Range[100],fQ] (* Ivan N. Ianakiev, May 04 2025 *)
  • PARI
    isok(k) = for(i=1, k\2, if(isprime(i*(k-i)+1), return(0))); 1;
Showing 1-6 of 6 results.