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.

A165783 a(n) = A002326(n-1) + A000120(A165781(n-1)).

Original entry on oeis.org

2, 3, 6, 4, 9, 15, 18, 5, 12, 27, 8, 15, 30, 27, 42, 6, 15, 17, 54, 16, 30, 21, 17, 32, 31, 10, 78, 28, 27, 87, 90, 7, 18, 99, 33, 49, 12, 29, 45, 56, 81, 123, 10, 39, 15, 16, 13, 50, 72, 45, 150, 74, 16, 159, 54, 50, 42, 63, 15, 33, 165, 26, 150, 8, 21, 195, 26, 53, 102, 207
Offset: 1

Views

Author

Ctibor O. Zizka, Sep 26 2009

Keywords

Comments

Given a shift register : r(k)=r(k-1)+ X if r(k-1) is not divisible Y, else r(k)=r(k-1)/Y.
Gcd(r(0), X))=1, Gcd(X, Y)=1.
Then the length of the period orbit of such a register is L + digitsum (r(L)*(Y^L-1)/ X). Digitsum(z)in base X.
r(L) a point from period orbit, L minimal possible exponent such that (Y^L-1)/X)is a positive integer.
Number of period orbits is the order of the cyclic group connected to the register.
a(n) is the period length for Y=2, X=2*n-1, r(L)=1. [Ctibor O. Zizka, Nov 24 2009]

Examples

			n=1, a(1)=1 + digitsum(1)= 2.
n=2, a(2)=2 + digitsum(1)=3.
n=3, a(3)= 4 + digitsum(3) = 6.
n=4, a(4)= 3 + digitsum(1)=4.
n=5, a(5)= 6 + digitsum(7)=9. [_Ctibor O. Zizka_, Nov 24 2009]
		

Crossrefs

Programs

  • Maple
    A002326 := proc(n) if n = 0 then 1; else numtheory[order](2,2*n+1) ; end if ; end proc:
    A165781 := proc(n) (2^A002326(n)-1)/(2*n+1) ; end proc:
    read("transforms") ; A165783 := proc(n) A002326(n-1)+wt(A165781(n-1) ) ; end proc:
    seq(A165783(n),n=1..80) ; # R. J. Mathar, Nov 26 2009
  • Mathematica
    Table[(b = MultiplicativeOrder[2, 2 n - 1]) + Plus @@ IntegerDigits[(2^b - 1)/(2 n - 1), 2], {n, 1, 70}] (* Ivan Neretin, May 09 2015 *)
  • PARI
    hamming(n)=my(v=binary(n));sum(i=1,#v,v[i])
    a(n)=my(x=2*n+1,m=znorder(Mod(2,x)));m+hamming((1<
    				

Formula

a(n) = L + digitsum((2^L -1)/(2*n-1)). Digitsum(z)in base 2. [Ctibor O. Zizka, Nov 24 2009]

Extensions

Program and extension by Charles R Greathouse IV, Nov 24 2009
Definition corrected and comments merged by R. J. Mathar, Nov 26 2009

A182297 Wieferich numbers (2): positive odd integers q such that q and (2^A002326((q-1)/2)-1)/q are not relatively prime.

Original entry on oeis.org

21, 39, 55, 57, 105, 111, 147, 155, 165, 171, 183, 195, 201, 203, 205, 219, 231, 237, 253, 273, 285, 291, 301, 305, 309, 327, 333, 355, 357, 385, 399, 417, 429, 453, 465, 483, 489, 495, 497, 505, 507, 525, 543, 555, 579, 597, 605, 609, 615, 627, 633, 651, 655
Offset: 1

Views

Author

Felix Fröhlich, Apr 23 2012

Keywords

Comments

The primes in this sequence are A001220, the Wieferich primes. - Charles R Greathouse IV, Feb 02 2014
Odd prime p is a Wieferich prime if and only if A002326((p^2-1)/2) = A002326((p-1)/2). See the sixth comment to A001220 and my formula below. - Thomas Ordowski, Feb 03 2014

Examples

			21 is in the sequence because the multiplicative order of 2 mod 21 is 6, and (2^6-1)/21 = 3, which is not coprime to 21.
		

Crossrefs

For another definition of Wieferich numbers, see A077816.
Cf. A002326.

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local q;
          for q from 2 +`if`(n=1, 1, a(n-1)) by 2
            while igcd((2^order(2, q)-1)/q, q)=1 do od; q
        end:
    seq (a(n), n=1..60);  # Alois P. Heinz, Apr 23 2012
  • Mathematica
    Select[Range[1, 799, 2], GCD[#, (2^MultiplicativeOrder[2, #] - 1)/#] > 1 &] (* Alonso del Arte, Apr 23 2012 *)
  • PARI
    is(n)=n%2 && gcd(lift(Mod(2,n^2)^znorder(Mod(2,n))-1)/n,n)>1 \\ Charles R Greathouse IV, Feb 02 2014

Formula

Odd numbers q such that A002326((q^2-1)/2) < q * A002326((q-1)/2). Other positive odd integers satisfy the equality. - Thomas Ordowski, Feb 03 2014
Odd numbers q such that gcd(A165781((q-1)/2), q) > 1. - Thomas Ordowski, Feb 12 2014

A249596 Analog of A097717 in base 2.

Original entry on oeis.org

1, 2, 9, 4, 35, 558, 2205, 8, 135, 137970, 33, 1068, 545259, 135926, 138845925, 16, 527, 2106, 35288379945, 2100, 537075, 8382, 2093, 4283544, 1069975, 130, 2294286602622705, 533820, 133371, 146557818382226310, 585910928570692725, 32, 2079
Offset: 1

Views

Author

R. J. Mathar, Mar 30 2009

Keywords

Comments

Conjecture: a(n) = n*A165781(n). - R. J. Mathar, Nov 11 2014

Crossrefs

Programs

  • Maple
    A249596 := proc(n)
        local m,b,mbas,msf ;
        b := 2;
        for m from 1 to 1999999 do
            mbas := convert(m,base,b) ;
            msf := [op(-1,mbas),op(1..nops(mbas)-1,mbas)] ;
            msf := add(op(i,msf)*b^(i-1),i=1..nops(msf)) ;
            if m/n = msf then
                return m;
            end if;
        end do:
        -1 ;
    end proc:
    for n from 1 do
        print(n,A249596(n)) ;
    end do: # R. J. Mathar, Nov 11 2014

Extensions

a(15)-a(33) from Lars Blomberg, Feb 05 2015

A352217 Smallest power of 2 that is one more than a multiple of 2n-1.

Original entry on oeis.org

2, 4, 16, 8, 64, 1024, 4096, 16, 256, 262144, 64, 2048, 1048576, 262144, 268435456, 32, 1024, 4096, 68719476736, 4096, 1048576, 16384, 4096, 8388608, 2097152, 256, 4503599627370496, 1048576, 262144, 288230376151711744, 1152921504606846976, 64, 4096
Offset: 1

Views

Author

J. Lowell, Mar 07 2022

Keywords

Comments

Every odd number is a divisor of a number of the form 2^n-1.

Examples

			a(5)=64 because 63 is the smallest number of the form 2^n-1 that's a multiple of 9.
		

Crossrefs

Programs

  • Maple
    a:= n-> 2^`if`(n=1, 1, numtheory[order](2, 2*n-1)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Mar 07 2022
  • Mathematica
    Table[2^MultiplicativeOrder[2, 2*n - 1], {n, 1, 33}] (* Amiram Eldar, Mar 08 2022 *)
  • PARI
    a(n) = 1 << znorder(Mod(2,2*n-1)); \\ Kevin Ryde, Mar 07 2022
  • Python
    def a(n):
        if n == 1: return 2
        p, m = 2, 2*n-1
        while p <= m or p % m != 1: p *= 2
        return p
    print([a(n) for n in range(1, 34)]) # Michael S. Branicky, Mar 07 2022
    
  • Python
    from sympy import n_order
    def a(n): return 2**n_order(2, 2*n-1)
    print([a(n) for n in range(1, 34)]) # Michael S. Branicky, Mar 07 2022 after Alois P. Heinz
    

Formula

From Alois P. Heinz, Mar 07 2022: (Start)
a(n) = 2^A002326(n-1).
a(n) = 1 + A165781(n-1)*(2*n-1). (End)

Extensions

a(14) and beyond from Michael S. Branicky, Mar 07 2022

A297362 Numbers k such that (2^ord(2, k) - 1)/k is prime, where ord(2, k) is the multiplicative order of 2 (mod k).

Original entry on oeis.org

5, 9, 21, 23, 33, 47, 51, 73, 85, 89, 93, 129, 167, 217, 223, 263, 315, 341, 381, 585, 819, 1057, 1365, 3591, 3855, 4681, 4871, 5461, 6141, 6223, 6719, 7487, 8193, 11447, 13107, 13367, 13797, 14329, 16513, 18631, 21845, 24573, 25575, 26431, 33825, 37449
Offset: 1

Views

Author

Amiram Eldar, Dec 29 2017

Keywords

Comments

The corresponding primes are 3, 7, 3, 89, 31, 178481, 5, 7, 3, 23, 11, ...

Examples

			5 is in the sequence since ord(2, 5) = 4 and (2^4 - 1)/5 = 3 is prime.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_] := PrimeQ[(2^MultiplicativeOrder[2, n] - 1)/n]; Select[Range[10000],aQ]
  • PARI
    is(n) = n%2 && isprime((2^znorder(Mod(2, n))-1)/n); \\ Amiram Eldar, Aug 26 2023

A237663 Odd numbers m such that the order of 2 mod m^3 is less than m times the order of 2 mod m^2.

Original entry on oeis.org

57, 111, 219, 285, 327, 399, 489, 505, 543, 555, 597, 627, 741, 777, 813, 969, 1083, 1095, 1137, 1221, 1255, 1299, 1311, 1379, 1425, 1443, 1461, 1467, 1515, 1533, 1569, 1623, 1635, 1653, 1731, 1767, 1839, 1887, 1893, 1995, 2005, 2109, 2271, 2289, 2337, 2409, 2433, 2445, 2451, 2487, 2553, 2649, 2679, 2715, 2757, 2775, 2793, 2811, 2847, 2973, 2985, 3005, 3021, 3027, 3135, 3189, 3219, 3351, 3363, 3423, 3437, 3441, 3459, 3477, 3505, 3513
Offset: 1

Views

Author

Keywords

Comments

These numbers m are a subset of the {A182297} Wieferich numbers (2).
All known numbers m are composite. A prime p satisfies this inequality if and only if the order of 2 mod p^3 is the order of 2 mod p, which is equivalent to p^3 dividing 2^(p-1)-1, but no such prime p are known (as opposed to the A001220 Wieferich primes).

Crossrefs

Programs

  • Mathematica
    okQ[m_] := MultiplicativeOrder[2, m^3] < m*MultiplicativeOrder[2, m^2]; Select[Range[1, 9999, 2], okQ] (* Jean-François Alcover, Dec 10 2015 *)
  • PARI
    is(m)=m%2 && znorder(Mod(2, m^3)) < m*znorder(Mod(2, m^2))

Formula

Odd numbers m such that A002326((m^3-1)/2) < m * A002326((m^2-1)/2).
Odd numbers m such that 1 < gcd(A165781((m-1)/2), m) is a square.
Showing 1-6 of 6 results.