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.

A036259 Numbers k such that the multiplicative order of 2 modulo k is odd.

Original entry on oeis.org

1, 7, 23, 31, 47, 49, 71, 73, 79, 89, 103, 127, 151, 161, 167, 191, 199, 217, 223, 233, 239, 263, 271, 311, 329, 337, 343, 359, 367, 383, 431, 439, 463, 479, 487, 497, 503, 511, 529, 553, 599, 601, 607, 623, 631, 647, 713, 719, 721, 727, 743, 751
Offset: 1

Views

Author

Keywords

Comments

Odd numbers k such that A007733(k) = A002326((k-1)/2) is odd.
Closed under multiplication. - Emmanuel Vantieghem, May 07 2025

Examples

			2^3 = 1 mod 7, 3 is odd, so 7 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 999, 2], OddQ[MultiplicativeOrder[2, #]]&] (* Jean-François Alcover, Dec 20 2017 *)
  • PARI
    is(n)=n%2 && znorder(Mod(2,n))%2 \\ Charles R Greathouse IV, Jun 24 2015
    
  • Python
    from sympy import n_order
    from itertools import count, islice
    def A036259_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n_order(2,n)&1,count(max(startvalue,1)|1,2))
    A036259_list = list(islice(A036259_gen(),20)) # Chai Wah Wu, Feb 07 2023

A306833 a(1) = 3; a(n+1) is the smallest k > a(n) such that 2^(k-1) == 1 (mod a(n)).

Original entry on oeis.org

3, 5, 9, 13, 25, 41, 61, 121, 221, 241, 265, 313, 469, 529, 760
Offset: 1

Views

Author

Thomas Ordowski, Mar 12 2019

Keywords

Comments

This sequence is finite, the last term a(15) = 760 is even.
Conjecture: for any initial term a(1), this recursion gives a finite sequence (ends with an even term).
Theorem: for odd a(n), a(n+1) is even if and only if ord_{a(n)}(2) is odd and (a(n) mod ord_{a(n)}(2)) is odd.
The set of penultimate terms of the sequences is {A036259} \ {A036260}.

Crossrefs

Programs

  • PARI
    lista(nn) = {a = 3; print1(a, ", "); for (n=2, nn, k = a+1; while (Mod(2, a)^(k-1) != 1, k++); a = k; print1(a, ", "); if (!(a%2), break););} \\ Michel Marcus, Mar 24 2019
Showing 1-2 of 2 results.