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.

Previous Showing 41-50 of 63 results. Next

A119513 a(n) = A119957(n) / n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 1, 0, 3, 2, 5, 1, 6, 1, 1, 0, 4, 3, 9, 2, 2, 5, 4, 1, 10, 6, 9, 1, 14, 1, 1, 0, 5, 4, 5, 3, 18, 9, 4, 2, 10, 2, 7, 5, 5, 4, 9, 1, 10, 10, 2, 6, 26, 9, 8, 1, 9, 14, 29, 1, 30, 1, 1, 0, 6, 5, 33, 4, 11, 5, 14, 3, 3, 18, 9, 9, 15, 4, 17, 2, 27, 10, 41, 2, 2, 7, 11, 5, 4, 5, 4, 4, 3, 9, 14
Offset: 1

Views

Author

Keywords

Examples

			a(35) = A119957(35) / 35 = 175 / 35 = 5.
		

Crossrefs

Cf. A119957, A007733, A038553. The positions of 1's are A175332.

Programs

  • Mathematica
    a[n_] := Total[PowerMod[2, Range[n-MultiplicativeOrder[2, n/2^IntegerExponent[n, 2]], n-1], n]] / n;
    Table[a[n], {n,95}] (* Andrei Zabolotskii, Jul 28 2025 *)

Extensions

Offset corrected by Andrei Zabolotskii, Jul 28 2025

A163956 Multiplicative order of 2 in Z/mZ with m = A002997(n).

Original entry on oeis.org

40, 24, 36, 56, 60, 660, 198, 252, 45, 180, 60, 144, 153, 1012, 36, 120, 300, 72, 36, 1160, 60, 36, 300, 56, 36, 660, 4284, 264, 420, 3060, 2268, 180, 540, 1680, 120, 4900, 1080, 396, 72, 72, 60, 60, 144, 2970, 612, 396, 324, 210, 180, 540, 504, 792, 198, 180
Offset: 1

Views

Author

A.K. Devaraj, Aug 28 2009

Keywords

Comments

Related sequence: A162990. - A.K. Devaraj, Aug 31 2009

References

  • A. K. Devaraj, "Minimum universal exponent generalisation of Fermat's theorem" (ISSN 1550-3747)

Crossrefs

Programs

  • Mathematica
    MultiplicativeOrder[2, #] & /@ Select[Range[1, 10^6, 2], CompositeQ[#] && Divisible[# - 1, CarmichaelLambda[#]] &] (* Amiram Eldar, Jul 30 2020 *)

Formula

a(n) = A002326((A002997(n)-1)/2) = A007733(A002997(n)). - Amiram Eldar, Jul 30 2020

Extensions

Corrected and extended by M. F. Hasler, Sep 23 2009
Edited by N. J. A. Sloane, Sep 23 2009, following suggestions from M. F. Hasler
More terms from Amiram Eldar, Jul 30 2020

A204983 a(n) = 2^(k-1)-2^(j-1), where (2^(k-1),2^(j-1)) is the least pair of distinct positive powers of 2 for which n divides 2^(k-1)-2^(j-1).

Original entry on oeis.org

1, 2, 3, 4, 15, 6, 7, 8, 63, 30, 1023, 12, 4095, 14, 15, 16, 255, 126, 262143, 60, 63, 2046, 2047, 24, 1048575, 8190, 262143, 28, 268435455, 30, 31, 32, 1023, 510, 4095, 252, 68719476735, 524286, 4095, 120, 1048575, 126, 16383, 4092, 4095
Offset: 1

Views

Author

Clark Kimberling, Jan 21 2012

Keywords

Comments

For a guide to related sequences, see A204892.
(Conjecture) Equivalently, the solution set of 2^p * (2^q - 1) = x * y, OR 2^q - 1 = 2^p * x * y, for at most one of the naturals x and y being given; unknown p and q in the integers; then a(n) = 2^p * (2^q - 1) where p and q are directly related to n (see formula). - Andrew T. Porter, Dec 20 2022

Crossrefs

Programs

  • Mathematica
    (See the program at A204979.)
  • PARI
    a(n) = for (k=1, oo, for (j=1, k-1, my(d=2^(k-1)-2^(j-1)); if (!(d % n), return(d)););); \\ Michel Marcus, Sep 16 2023

Formula

Conjecture: a(n) = 2^A007814(n) * (2^A007733(n) - 1). - Andrew T. Porter, Dec 20 2022

A226181 Primes p such that p-1 divided by the period of the binary expansion of 1/p equals 2^x for some nonnegative integer x.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 41, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 113, 131, 137, 139, 149, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 227, 233, 239, 257, 263, 269, 271, 281, 293, 311, 313, 317, 337, 347, 349
Offset: 1

Views

Author

Lear Young, May 30 2013

Keywords

Comments

Equivalently, p-1 divided by the period of the decimal expansion of 1/p equals 2^x for some nonnegative integer x. Composite numbers satisfying this condition are given in A243050. - Lear Young, May 30 2013
Let pi_1(x) and pi(x) be the numbers of primes of this sequence and all primes not exceeding x, respectively. Then, for x>=3, p_1(x)/pi(x) >= C_Artin = 0.37395581... Numerical results suggest that it is likely lim pi_1(x)/pi(x) = 2*C_Artin. - Peter J. C. Moses and Vladimir Shevelev, May 29 2014

Examples

			(41-1)/20 = 2. 20 is the period of the binary representation of 1/n, the odd part of 2 is 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2, 100]], # == 2^IntegerExponent[#, 2] &[(# - 1)/MultiplicativeOrder[2, #]] &] (* Peter J. C. Moses, May 28 2014 *)
  • PARI
    is(n) = {
      m = valuation(n+1,2);
          k=(n+1)>>m;
          if(k!=1, for(i=0,(n-1)>>1,
            l=valuation(k+n,2);
            k=(k+n)>>l;
            m+=l;if(k==1,break)));
           ((n-1)/m)>>valuation((n-1)/m, 2)==1
           \\ m  equals znorder(Mod(2,n))
        }
    forstep(i=3,1e3,2,if(is(i),print1(i, ", ")))
    \\ Lear Young May 30 2013
    
  • PARI
    forstep(i=1,1e3,2,j = (i-1)/znorder(Mod(2,i));if(j>>valuation(j, 2)==1,print1(i, ", "))) \\ Lear Young May 31 2013

A246503 Numbers m such that m^2 divides 2^k - 1 for some k, 0 < k <= m.

Original entry on oeis.org

1, 1093, 3279, 3511, 5465, 7651, 9837, 10533, 14209, 16395, 17555, 18581, 22953, 24577, 31599, 31697, 38255, 38621, 42627, 45643, 46999, 49185, 52665, 53557, 55743, 57929, 60115, 62301, 66709, 68859, 71045, 73731, 84161, 86347, 92905, 94797, 95091, 99463
Offset: 1

Views

Author

Max Alekseyev, Nov 29 2014

Keywords

Comments

All terms are odd. m=1 is the only term with k=m.
Odd numbers m such that A007733(m^2) = A002326((m^2-1)/2) <= m.
Prime terms are Wieferich primes (A001220).

Crossrefs

Programs

  • Python
    A246503_list = [1]
    for i in range(2, 10**4):
        d, n = i*i, 1
        for _ in range(i):
            n = (2*n) % d
            if n == 1:
                A246503_list.append(i)
                break # Chai Wah Wu, Dec 04 2014

A250211 Square array read by antidiagonals: A(m,n) = multiplicative order of m mod n, or 0 if m and n are not coprime.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 4, 1, 1, 0, 2, 0, 4, 0, 1, 1, 1, 0, 1, 2, 0, 3, 1, 1, 0, 1, 0, 0, 0, 6, 0, 1, 1, 1, 2, 2, 1, 2, 3, 2, 6, 1, 1, 0, 0, 0, 4, 0, 6, 0, 0, 0, 1, 1, 1, 1, 1, 4, 1, 2, 2, 3, 4, 10, 1, 1, 0, 2, 0, 2, 0, 0, 0, 6, 0, 5, 0, 1, 1, 1, 0, 2, 0, 0, 1, 2, 0, 0, 5, 0, 12, 1
Offset: 1

Views

Author

Eric Chen, Dec 29 2014

Keywords

Comments

Read by antidiagonals:
m\n 1 2 3 4 5 6 7 8 9 10 11 12 13
1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 1 0 2 0 4 0 3 0 6 0 10 0 12
3 1 1 0 2 4 0 6 2 0 4 5 0 3
4 1 0 1 0 2 0 3 0 3 0 5 0 6
5 1 1 2 1 0 2 6 2 6 0 5 2 4
6 1 0 0 0 1 0 2 0 0 0 10 0 12
7 1 1 1 2 4 1 0 2 3 4 10 2 12
8 1 0 2 0 4 0 1 0 2 0 10 0 4
9 1 1 0 1 2 0 3 1 0 2 5 0 3
10 1 0 1 0 0 0 6 0 1 0 2 0 6
11 1 1 2 2 1 2 3 2 6 1 0 2 12
12 1 0 0 0 4 0 6 0 0 0 1 0 2
13 1 1 1 1 4 1 2 2 3 4 10 1 0
etc.
A(m,n) = Least k>0 such that m^k=1 (mod n), or 0 if no such k exists.
It is easy to prove that column n has period n.
A(1,n) = 1, A(m,1) =1.
If A(m,n) differs from 0, it is period length of 1/n in base m.
The maximum number in column n is psi(n) (A002322(n)), and all numbers in column n (except 0) divide psi(n), and all factors of psi(n) are in column n.
Except the first row, every row contains all natural numbers.

Examples

			A(3,7) = 6 because:
3^0 = 1 (mod 7)
3^1 = 3 (mod 7)
3^2 = 2 (mod 7)
3^3 = 6 (mod 7)
3^4 = 4 (mod 7)
3^5 = 5 (mod 7)
3^6 = 1 (mod 7)
...
And the period is 6, so A(3,7) = 6.
		

Crossrefs

Programs

  • Maple
    f:= proc(m,n)
      if igcd(m,n) <> 1 then 0
      elif n=1 then 1
      else numtheory:-order(m,n)
      fi
    end proc:
    seq(seq(f(t-j,j),j=1..t-1),t=2..65); # Robert Israel, Dec 30 2014
  • Mathematica
    a250211[m_, n_] = If[GCD[m, n] == 1, MultiplicativeOrder[m, n], 0]
    Table[a250211[t-j, j], {t, 2, 65}, {j, 1, t-1}]

A279189 Primes p such that L(p^2) = (p-1)*L(p), where L(i) = A279186(i).

Original entry on oeis.org

2, 3, 5, 29, 179, 293, 317, 467, 509, 659, 797, 1427, 1949, 2213, 2339, 2579, 2909, 3677, 4157, 4229, 4253, 4349, 5309, 5573, 5693, 5843, 5939, 6173, 6269, 6653, 6899, 6947, 7043, 7517, 7589, 8387, 8573, 8819, 9059, 9533, 10067, 10163, 10259, 10589, 11069, 11549, 11939, 13763, 14627, 15443
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Comments

Also, union of {2} and the primes p from A001122 such that gcd(p-1,A007733(p-1)) = 1. - Max Alekseyev, Feb 02 2024

Crossrefs

Excluding a(1)=2, forms a subsequence of A001122.

Programs

  • Mathematica
    T[n_, k_] := Module[{g, y, r}, If[k == 0, Return[1]]; y = n; g = GCD[k, y]; While[g > 1, y = y/g; g = GCD[k, y]]; If[y == 1, Return[1]]; r = MultiplicativeOrder[k, y]; r = r/2^IntegerExponent[r, 2]; If[r == 1, Return[1]]; MultiplicativeOrder[2, r]];
    L[n_] := L[n] = Table[T[n, k], {k, 0, n - 1}] // Max;
    For[p = 2, p < 1000, p = NextPrime[p], If[L[p^2] == (p-1) L[p], Print[p]]] (* Jean-François Alcover, Oct 07 2018, after Robert Israel in A279186 *)

Extensions

a(8)-a(11) from Jean-François Alcover, Oct 07 2018
Terms a(12) onward from Max Alekseyev, Feb 02 2024

A074203 Odd numbers k such that the number of 1's in the binary representation of k divides 2^k-1.

Original entry on oeis.org

1, 351, 375, 381, 471, 477, 501, 687, 699, 747, 855, 861, 885, 939, 981, 1119, 1143, 1149, 1239, 1245, 1269, 1311, 1335, 1341, 1359, 1371, 1383, 1389, 1395, 1401, 1431, 1437, 1461, 1479, 1485, 1491, 1497, 1509, 1521, 1623, 1629, 1653, 1707, 1749, 1815
Offset: 1

Views

Author

Benoit Cloitre, Sep 17 2002

Keywords

Comments

Except for 1, terms seem always divisible by 3.
From Robert Israel, Jan 14 2019: (Start)
An odd number k is in the sequence if and only if A000120(k) is in A036259 and k is divisible by A007733(A000120(k)). In particular, there are infinitely many of these for every member of A036259 except 1.
Thus a(2) to a(28842) have A000120(k)=7 and are divisible by 3, but a(28843) = 12582911 has A000120(12582911) = 23 and is divisible by A007733(23) = 11 but not by 3. (End)

Crossrefs

Programs

  • Maple
    filter:= n -> 2 &^ n - 1 mod convert(convert(n,base,2),`+`) = 0:
    select(filter, [seq(i,i=1..2000,2)]); # Robert Israel, Jan 13 2019
  • Mathematica
    Join[{1}, Select[Range[3, 2000, 2], PowerMod[2, #, DigitCount[#, 2, 1]] == 1 &]] (* Amiram Eldar, Jun 08 2022 *)
  • PARI
    isok(n) = (n % 2) && !((2^n-1) % hammingweight(n)); \\ Michel Marcus, Nov 29 2013

A104013 First digit-cycle of binary expansion of 1/n. Any initial 0's are to be placed at end of cycle.

Original entry on oeis.org

0, 0, 10, 0, 1100, 10, 100, 0, 111000, 1100, 1011101000, 10, 100111011000, 100, 1000, 0, 11110000, 111000, 110101111001010000, 1100, 110000, 1011101000, 10110010000, 10, 10100011110101110000, 100111011000, 100101111011010000
Offset: 1

Views

Author

Bryan Jacobs (bryanjj(AT)gmail.com), Feb 25 2005

Keywords

Examples

			1/5 = 0.00110011001100... in binary, so a(5) = 1100.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[IntegerQ@ Log2@ n, 0, FromDigits[ RealDigits[1/n, 2][[1, 1]]]]; Array[f, 27] (* Robert G. Wilson v, Sep 01 2015 *)

A137332 Primes which are equal to the order of 2 modulo a prime q, sorted with respect to the value of q.

Original entry on oeis.org

2, 3, 11, 5, 23, 11, 7, 83, 37, 29, 131, 179, 191, 43, 73, 239, 251, 359, 419, 431, 443, 491, 29, 659, 683, 233, 179, 719, 743, 911, 239, 1019, 1031, 29, 1103, 47, 397, 1223, 79, 461, 1439, 1451, 1499, 1511, 1559, 1583, 557, 113, 431, 577, 601, 1811, 1931
Offset: 1

Views

Author

Joerg Arndt, Apr 07 2008

Keywords

Comments

This is a multipermutation of the primes A000040 with every prime p appearing exactly A001221(2^p-1) times. - Max Alekseyev, May 01 2008

Examples

			The k-th term of the sequence is ord(2 mod A122094(k)).
For example, 223 is the 9th term of A122094 and ord(2 mod 223)=37, so 37 is the 9th term of this sequence.
11 is both the third term because ord(2 mod 23) == 11 and the sixth term because ord(2 mod 89) == 11.
Note both 23 and 89 divide 2^11-1; the third and sixth terms of A122094 are 23 and 89.
		

Crossrefs

Programs

  • Mathematica
    Select[MultiplicativeOrder[2, #] & /@ Select[Range[3, 4000, 2], PrimeQ], PrimeQ] (* Amiram Eldar, Apr 04 2020 *)
  • PARI
    forprime (p=3, 10^4, r = znorder( Mod(2,p) ); if ( isprime(r), print1(r, ", "); ); );

Formula

a(n) = A007733(A122094(n)) = A002326((A122094(n)-1)/2). - Max Alekseyev, May 01 2008

Extensions

Definition revised by Max Alekseyev, May 01 2008
Previous Showing 41-50 of 63 results. Next