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 19 results. Next

A163782 a(n) is the n-th J_2-prime (Josephus_2 prime).

Original entry on oeis.org

2, 5, 6, 9, 14, 18, 26, 29, 30, 33, 41, 50, 53, 65, 69, 74, 81, 86, 89, 90, 98, 105, 113, 134, 146, 158, 173, 174, 186, 189, 194, 209, 210, 221, 230, 233, 245, 254, 261, 270, 273, 278, 281, 293, 306, 309, 326, 329
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclically mark the 2nd unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_2-prime if this permutation consists of a single cycle of length N.
The resulting permutation can be written as p(m,N) = (2N+1-||2N+1-m||)/2 (1 <= m <= N), where ||x|| is the odd number such that x/||x|| is a power of 2. E.g., ||16||=1 and ||120||=15.
No formula is known for a(n): the J_2-primes have been found by exhaustive search (however, see the CROSS-REFERENCES). But we have: (1) N is J_2-prime iff p=2N+1 is a prime number and +2 generates Z_p^* (the multiplicative group of Z_p). (2) N is J_2-prime iff p=2N+1 is a prime number and exactly one of the following holds: (a) N == 1 (mod 4) and +2 generates Z_p^* but -2 does not, (b) N == 2 (mod 4) and both +2 and -2 generate Z_p^*.

Examples

			p(1,5)=3, p(2,5)=1, p(3,5)=5, p(4,5)=2 and p(5,5)=4.
So p=(1 3 5 4 2) and 5 is J_2-prime.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

A163783 through A163800 for J_3- through J_20-primes.
Considered as sets, A163782 is the union of A163777 and A163779, it equals the difference of A054639 and A163780, and 2*a(n) results in A071642.

Programs

  • Java
    isJ2Prime(int n) { // for n > 1
      int count = 0, leader = 0;
      if (n % 4 == 1 || n % 4 == 2) { // small optimization
        do {
          leader = A025480(leader + n);
          count++;
        } while (leader != 0);
      }
      return count == n;
    } // Joe Nellis, Jan 27 2023
  • Mathematica
    lst = {};
    Do[If[IntegerQ[(2^n + 1)/(2 n + 1)] && PrimitiveRoot[2 n + 1] == 2,
    AppendTo[lst, n]], {n, 2, 10^5}]; lst (* Hilko Koning, Sep 21 2021 *)
  • PARI
    Follow(s,f)={my(t=f(s),k=1); while(t>s, k++; t=f(t)); if(s==t, k, 0)}
    ok(n)={my(d=2*n+1); n>1&&n==Follow(1,i->(d-((d-i)>>valuation(d-i, 2)))/2)}
    select(n->ok(n),[1..1000]) \\ Andrew Howroyd, Nov 11 2017
    
  • PARI
    forprime(p=5, 2000, if(znorder(Mod(2, p))==p-1, print1((p-1)/2, ", "))); \\ Andrew Howroyd, Nov 11 2017
    

Formula

a(n) = A071642(n+3)/2.

A163783 a(n) is the n-th J_3-prime (Josephus_3 prime).

Original entry on oeis.org

3, 5, 27, 89, 1139, 1219, 1921, 2155, 5775, 9047, 12437, 78785, 105909, 197559, 1062657
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 3rd unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_3-prime if this permutation consists of a single cycle of length N.
There are 14 J_3-primes in the interval 2..1000000 only. No formula is known; the J_3-primes have been found by exhaustive search.
a(16) > 3*10^6. - Bert Dobbelaere, Apr 20 2019

Examples

			All J_3-primes are odd.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

A163782 for J_2-primes. A163784 through A163800 for J_4- through J_20-primes.

Extensions

a(15) from Bert Dobbelaere, Apr 20 2019

A163784 a(n) is the n-th J_4-prime (Josephus_4 prime).

Original entry on oeis.org

2, 5, 10, 369, 609, 1841, 2462, 3297, 3837, 14945, 94590, 98121, 965013, 1634157
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 4th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_4-prime if this permutation consists of a single cycle of length N.
There are 13 J_4-primes in the interval 2..1000000 only. No formula is known; the J_4-primes have been found by exhaustive search.
a(15) > 3*10^6. - Bert Dobbelaere, Apr 20 2019

Examples

			2 is a J_4-prime (trivial).
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

A163782 through A163783 for J_2- through J_3-primes. A163785 through A163800 for J_5- through J_20-primes.

Extensions

a(14) from Bert Dobbelaere, Apr 20 2019

A163785 a(n) is the n-th J_5-prime (Josephus_5 prime).

Original entry on oeis.org

3, 15, 17, 45, 73, 83, 165, 177, 181, 229, 377, 383, 787, 2585, 3127, 3635, 4777, 36417, 63337, 166705, 418411
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 5th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_5-prime if this permutation consists of a single cycle of length N.
There are 21 J_5-primes in the interval 2..1000000 only. No formula is known; the J_5-primes have been found by exhaustive search.

Examples

			All J_5-primes are odd.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Cf. A163782 through A163784 for J_2- through J_4-primes.
Cf. A163786 through A163800 for J_6- through J_20-primes.

A163786 a(n) is the n-th J_6-prime (Josephus_6 prime).

Original entry on oeis.org

2, 13, 17, 18, 34, 49, 93, 97, 106, 225, 401, 745, 2506, 3037, 3370, 4713, 5206, 8585, 13418, 32237, 46321, 75525, 97889, 106193, 238513, 250657, 401902, 490118
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 6th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_6-prime if this permutation consists of a single cycle of length N.
There are 28 J_6-primes in the interval 2..1000000 only. No formula is known; the J_6-primes were found by exhaustive search.

Examples

			2 is a J_6-prime (trivial).
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Cf. A163782 through A163785 for J_2- through J_5-primes.
Cf. A163787 through A163800 for J_7- through J_20-primes.

A163787 a(n) is the n-th J_7-prime (Josephus_7 prime).

Original entry on oeis.org

5, 11, 21, 35, 85, 103, 161, 231, 543, 1697, 1995, 2289, 37851, 49923, 113443, 236091, 285265
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 7th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_7-prime if this permutation consists of a single cycle of length N.
There are 17 J_7-primes in the interval 2..1000000 only. No formula is known; the J_7-primes have been found by exhaustive search.

Examples

			All J_7-primes are odd.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Cf. A163782 through A163786 for J_2- through J_6-primes.
Cf. A163788 through A163800 for J_8- through J_20-primes.

A163788 a(n) is the n-th J_8-prime (Josephus_8 prime).

Original entry on oeis.org

2, 6, 10, 62, 321, 350, 686, 3217, 4981, 21785, 22305, 350878, 378446, 500241, 576033, 659057, 917342
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 8th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_8-prime if this permutation consists of a single cycle of length N.
There are 17 J_8-primes in the interval 2..1000000 only. No formula is known; the J_8-primes were found by exhaustive search.

Examples

			2 is a J_8-prime (trivial).
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Cf. A163782 through A163787 for J_2- through J_7-primes.
Cf. A163789 through A163800 for J_9- through J_20-primes.

A163789 a(n) is the n-th J_9-prime (Josephus_9 prime).

Original entry on oeis.org

3, 39, 53, 2347, 6271, 121105, 386549, 519567, 958497
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 9th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_9-prime if this permutation consists of a single cycle of length N.
There are 9 J_9-primes in the interval 2..1000000 only. No formula is known; the J_9-primes have been found by exhaustive search.

Examples

			All J_9-primes are odd.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

CF. A163782 through A163788 for J_2- through J_8-primes.
Cf. A163790 through A163800 for J_10- through J_20-primes.

A163790 a(n) is the n-th J_10-prime (Josephus_10 prime).

Original entry on oeis.org

2, 17, 98, 174, 181, 238, 6774, 9057, 44929, 54594, 58389
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 05 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 10th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_10-prime if this permutation consists of a single cycle of length N.
There are 11 J_10-primes in the interval 2..1000000 only. No formula is known; the J_10-primes were found by exhaustive search.

Examples

			2 is a J_10-prime (trivial).
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Cf. A163782 through A163789 for J_2- through J_9-primes.
Cf. A163791 through A163800 for J_11- through J_20-primes.

A163791 a(n) is the n-th J_11-prime (Josephus_11 prime).

Original entry on oeis.org

3, 9, 27, 47, 63, 185, 617, 15189, 56411, 182439, 271607, 658521
Offset: 1

Views

Author

Peter R. J. Asveld, Aug 04 2009

Keywords

Comments

Place the numbers 1..N (N>=2) on a circle and cyclicly mark the 11th unmarked number until all N numbers are marked. The order in which the N numbers are marked defines a permutation; N is a J_11-prime if this permutation consists of a single cycle of length N.
There are 12 J_11-primes in the interval 2..1000000 only. No formula is known; the J_11-primes have been found by exhaustive search.

Examples

			All J_11-primes are odd.
		

References

  • R. L. Graham, D. E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison-Wesley, Reading, MA. Sections 1.3 & 3.3.

Crossrefs

Cf. A163782 through A163790 for J_2- through J_10-primes.
Cf. A163792 through A163800 for J_12- through J_20-primes.
Showing 1-10 of 19 results. Next