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.

A282026 a(n) is the smallest m with gcd(m, 2*n+1) = 1 such that 2*n + 2*m + 1 is composite.

Original entry on oeis.org

4, 11, 2, 1, 8, 2, 1, 17, 2, 1, 2, 1, 1, 4, 2, 1, 1, 2, 1, 5, 2, 1, 2, 1, 1, 2, 1, 1, 4, 2, 1, 1, 2, 1, 4, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 8, 2, 1, 8, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 4, 2, 1, 1, 1, 1, 4, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2017

Keywords

Comments

Starting at 2*n + 1, find the next odd composite number 2*n + 2*m + 1 that is relatively prime to 2*n + 1; then a(n) = m.
Since 2*n + 3 is relatively prime to 2*n + 1, and (2*n + 3)^2 is composite, a(n) <= 2*n^2 + 5*n + 4 (this is tight for n=0 and n=1).
From Andrey Zabolotskiy, Feb 13 2017: (Start)
Up to n = 10^7, a(n) are from the set [1, 2, 4, 5, 7, 8, 11, 13, 14, 16, 17, 19, 22]. First occurrence of 14 is a(99412), first occurrence of 22 is a(7225627). [Thanks to Altug Alkan for pointing out a(99412).]
a(n) = 1 iff n is in A153238.
(End)
Based on Altug Alkan's b-file, the records in this sequence are 4, 11, 17, 19, ... and occur at positions 1, 2, 8, 638, ... If the sequence is unbounded, then these two subsidiary sequences should be added to the OEIS (if they are new). - N. J. A. Sloane, Feb 13 2017

Examples

			When n=1, 2*n + 1 = 3, and 5, 7, 9, 11, 13, 15, 17, 19, 21, 23 are all either prime or have a common factor with 3. The next term, 25, is OK, and so a(1) = (25 - 3)/2 = 11.
		

Crossrefs

Programs

  • Mathematica
    Table[m = 1; While[Nand[CoprimeQ[m, 2 n + 1], CompositeQ[2 (n + m) + 1]], m++]; m, {n, 0, 120}] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n) = my(k=1); while(isprime(2*n+2*k+1) || gcd(2*n+1, k) != 1, k++); k; \\ Altug Alkan, Feb 13 2017

Extensions

Definition corrected by Altug Alkan, Feb 13 2017

A282429 List of distinct terms of A282026.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 11, 13, 14, 16, 17, 19, 22, 23, 26, 28, 29, 31
Offset: 1

Views

Author

Altug Alkan and Andrey Zabolotskiy, Feb 15 2017, following a suggestion from N. J. A. Sloane

Keywords

Comments

a(n) occurs in A282026 for the first time at the position A282423(a(n)).

Examples

			3 is not a term. Proof: Suppose 3 is a term of A282026. For the corresponding n, 2*n + 1 cannot be divisible by 3 because of A282026’s definition (gcd(3, 2*n + 1) = 1). So 2*n + 1 can be only of the form 6*k + 1 or 6*k + 5. But 6*k + 1 + 2*1 and 6*k + 5 + 2*2 are both composite numbers and 1, 2 are relatively prime to any odd number. Since they are smaller than 3, this is the contradiction to the assumption that 3 is the term which is the smallest number for corresponding n. This also proves that 3*k cannot be a term of this sequence for any k >= 1.
		

Crossrefs

Programs

  • Mathematica
    Union@ Table[m = 1; While[Nand[CoprimeQ[m, 2 n + 1], CompositeQ[2 (n + m) + 1]], m++]; m, {n, 0, 10^7}] (* Michael De Vlieger, Feb 18 2017 *)
Showing 1-2 of 2 results.