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 31-40 of 67 results. Next

A372801 Order of 16 modulo the n-th prime: least k such that prime(n) divides 16^k-1.

Original entry on oeis.org

1, 1, 3, 5, 3, 2, 9, 11, 7, 5, 9, 5, 7, 23, 13, 29, 15, 33, 35, 9, 39, 41, 11, 12, 25, 51, 53, 9, 7, 7, 65, 17, 69, 37, 15, 13, 81, 83, 43, 89, 45, 95, 24, 49, 99, 105, 37, 113, 19, 29, 119, 6, 25, 4, 131, 67, 135, 23, 35, 47, 73, 51, 155, 39, 79, 15, 21, 173, 87, 22, 179
Offset: 2

Views

Author

Jianing Song, May 13 2024

Keywords

Comments

a(n) is the period of the expansion of 1/prime(n) in hexadecimal.

Crossrefs

Cf. A302141 (order of 16 mod 2n+1).

Programs

  • PARI
    a(n) = znorder(Mod(16, prime(n))).

Formula

a(n) = A014664(n)/gcd(4, A014664(n)) = A082654(n)/gcd(2, A082654(n)).
a(n) <= (prime(n) - 1)/2.

A201912 Irregular triangle of 2^k mod prime(n).

Original entry on oeis.org

0, 1, 2, 1, 2, 4, 3, 1, 2, 4, 1, 2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12, 1, 2, 4, 8, 16, 3, 6, 12, 24
Offset: 1

Views

Author

T. D. Noe, Dec 17 2011

Keywords

Comments

The row lengths are in A014664. For n > 1, the first term of each row is 1 and the last term is 2*prime(n)-1, which is A006254. Many sequences are in this one.

Examples

			The first 11 rows are:
2:  0;
3:  1, 2;
5:  1, 2, 4, 3;
7:  1, 2, 4;
11: 1, 2, 4, 8,  5, 10,  9,  7,  3,  6;
13: 1, 2, 4, 8,  3,  6, 12, 11,  9,  5, 10,  7;
17: 1, 2, 4, 8, 16, 15, 13,  9;
19: 1, 2, 4, 8, 16, 13,  7, 14,  9, 18, 17, 15, 11,  3,  6, 12,  5, 10;
23: 1, 2, 4, 8, 16,  9, 18, 13,  3,  6, 12;
29: 1, 2, 4, 8, 16,  3,  6, 12, 24, 19,  9, 18,  7, 14, 28, 27, 25, 21, 13, 26, 23, 17, 5, 10, 20, 11, 22, 15;
31: 1, 2, 4, 8, 16;
		

Crossrefs

Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), A269266 (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67), A036135 (p=83), A036138 (p=101), A036140 (p=107), A036144 (p=131), A036146 (p=139), A036147 (p=149), A036150 (p=163), A036152 (p=173), A036153 (p=179), A036154 (p=181), A036157 (p=197), A036159 (p=211), A036161 (p=227).

Programs

  • GAP
    P:=Filtered([1..350],IsPrime);;
    R:=List([1..Length(P)],n->OrderMod(2,P[n]));;
    Flat(Concatenation([0],List([2..10],n->List([0..R[n]-1],k->PowerMod(2,k,P[n]))))); # Muniru A Asiru, Feb 01 2019
  • Mathematica
    nn = 10; p = 2; t = p^Range[0,Prime[nn]]; Flatten[Table[If[Mod[n, p] == 0, {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, Prime[Range[nn]]}]]

A226216 Primes p such that (p-1)/ord(2,p) > (q-1)/ord(2,q) for odd primes q < p.

Original entry on oeis.org

3, 7, 31, 73, 127, 601, 683, 1103, 1801, 2731, 5419, 8191, 43691, 61681, 65537, 121369, 122921, 131071, 178481, 262657, 524287, 2099863, 2796203, 6700417, 10567201, 13264529, 20394401, 48544121, 97685839, 112901153, 160465489, 164511353, 420778751, 536903681, 616318177
Offset: 1

Views

Author

Keywords

Comments

Essentially records in A001917. Sequence is infinite.
The Mersenne primes (A000668) are a subset. - Jeppe Stig Nielsen, Aug 30 2015

Crossrefs

Programs

  • Mathematica
    r=0; p=3; L={}; While[Length@L < 20, v = (p-1)/ MultiplicativeOrder[2, p]; If[v > r, r = v; AppendTo[L, p]]; p = NextPrime@ p]; L (* Giovanni Resta, Aug 31 2015 *)
  • PARI
    r=0;forprime(p=3,1e9,t=(p-1)/znorder(Mod(2,p));if(t>r,r=t;print1(p", ")))

Formula

a(n) = prime(A152597(n)). - Amiram Eldar, Nov 16 2023

A278966 Least Hamming weight of multiples of the n-th prime.

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 2, 2, 3, 2, 5, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 2, 4, 2, 2, 3, 2, 2, 2, 7, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 4, 2, 2, 4, 3, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 4, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 2, 2, 3, 2, 2, 2, 2
Offset: 1

Views

Author

Keywords

Comments

Since all primes after the first are odd, a(n) > 1 for n > 1.
a(n) = 2 if and only if A014664(n) is even, or equivalently prime(n) is not in A014663. - Robert Israel, Dec 08 2016
If prime(n) = A000668(k), then a(n) = A000043(k). - Robert Israel, Dec 20 2016

Crossrefs

Programs

  • Maple
    f:= proc(n) local p, R, V, W, k,v,r;
        p:= ithprime(n);
        R:= {seq(2 &^ i mod p, i=0..numtheory:-order(2,p)-1)};
        Rm:= map(t -> p-t, R);
        V:= R;
        W:= V;
        for k from 2 do
          if nops(V intersect Rm) > 0 then return k fi;
          V:= {seq(seq(v+r mod p, v=V),r=R)} minus W;
        W:= W union V;
        od
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Dec 20 2016
  • Mathematica
    a[n_] := Module[{p, R, V, W, k, v, r}, p = Prime[n]; R = Union @ Table[ PowerMod[2, i, p], {i, 0, MultiplicativeOrder[2, p]-1}]; Rm = p - R; V = R; W = V; For[k = 2, True, k++, If[Length[V ~Intersection~ Rm] > 0, Return[k]]; V = Union@ Flatten@ Table[Table[v + Mod[r, p], {v, V}], {r, R}] ~Complement~ W; {W, W ~Union~ V}]];
    a[1] = 1;
    Array[a, 100] (* Jean-François Alcover, Jun 08 2020, after Robert Israel *)
  • PARI
    a(n,p=prime(n))=my(o=znorder(Mod(2,p)), v1=Set(powers(Mod(2,p),o)), v=v1, s=1); while(!setsearch(v,Mod(0,p)), v=setbinop((x,y)->x+y,v,v1); s++); s

Formula

a(n) = A000120(A278967(n)). In particular, a(n) = A000120(prime(n)) whenever prime(n) is in A143027. - Max Alekseyev, May 22 2025

A245486 Product of the greatest prime factor of n and the greatest prime factor of n+1.

Original entry on oeis.org

2, 6, 6, 10, 15, 21, 14, 6, 15, 55, 33, 39, 91, 35, 10, 34, 51, 57, 95, 35, 77, 253, 69, 15, 65, 39, 21, 203, 145, 155, 62, 22, 187, 119, 21, 111, 703, 247, 65, 205, 287, 301, 473, 55, 115, 1081, 141, 21, 35, 85, 221, 689, 159, 33, 77, 133, 551, 1711, 295, 305
Offset: 1

Views

Author

Keywords

Comments

We take gpf(1) = 1 by convention.
Except for the initial 2, every member is in A006881.
2^n+1 is never divisible by 23, and when 2^n-1 is divisible by 23, it's also divisible by 89. So 46 cannot occur in the sequence. - Jack Brennen, Jul 23 2014
More generally, let m = A014664(i), i >= 2. If m is odd, 2*A000040(i) occurs in the sequence iff A000040(i) = A006530(2^m-1), in which case it is a(2^m-1). If m is even, 2*A000040(i) occurs in the sequence iff A000040(i) = A006530(2^(m/2)+1), in which case it is a(2^m). - Robert Israel, Jul 24 2014
If a(n) = prime(i)*prime(j), where i < j, then n <= A002072(j). Using this, it can be shown that 3*89 does not occur in the sequence. - Robert Israel, Jul 24 2014
This sequence has an infinite limit; equivalently, each value in A006881 occurs only finitely many times in it. See A002072 for references.

Crossrefs

Programs

  • Maple
    gpf:= n -> max(numtheory:-factorset(n)):
    gpf(1):= 1:
    seq(gpf(n)*gpf(n+1),n=1..100); # Robert Israel, Jul 24 2014
  • Mathematica
    gpf[n_] := FactorInteger[n][[-1, 1]]; f[n_] := gpf[n] gpf[n + 1]; Array[f, 60] (* Robert G. Wilson v, Jul 23 2014 *)
    Times@@@Partition[Table[FactorInteger[n][[-1,1]],{n,100}],2,1] (* Harvey P. Dale, Sep 24 2017 *)
  • PARI
    gpf(n)=my(ps);if(n<=1,n,ps=factor(n)[,1]~;ps[#ps])
    a(n) = gpf(n)*gpf(n+1)

Formula

a(n) = A006530(n) * A006530(n+1).

A263647 Numbers k such that 2^k-1 and 3^k-1 are coprime.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 13, 14, 15, 17, 19, 21, 25, 26, 27, 29, 31, 34, 37, 38, 39, 41, 45, 47, 49, 51, 53, 57, 59, 61, 62, 63, 65, 67, 71, 73, 74, 79, 81, 85, 87, 89, 91, 93, 94, 97, 98, 101, 103, 107, 109, 111, 113, 118, 122, 123, 125, 127, 133, 134, 135, 137, 139, 141, 142, 145, 147, 149, 151, 153, 157, 158, 159, 163, 167, 169, 171
Offset: 1

Views

Author

Robert Israel, Oct 22 2015

Keywords

Comments

n such that there is no k for which both A014664(k) and A062117(k) divide n.
If n is in the sequence, then so is every divisor of n.
1 and 2 are the only members that are in A006093.
Conjectured to be infinite: see the Ailon and Rudnick paper.

Examples

			gcd(2^1-1, 3^1-1) = gcd(1,2) = 1, so a(1) = 1.
gcd(2^2-1, 3^2-1) = gcd(3,8) = 1, so a(2) = 2.
gcd(2^4-1, 3^4-1) = gcd(15,80) = 5, so 4 is not in the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..200] | Gcd(2^n-1, 3^n-1) eq 1]; // Vincenzo Librandi, May 01 2016
  • Maple
    select(n -> igcd(2^n-1,3^n-1)=1, [$1..1000]);
  • Mathematica
    Select[Range[200], GCD[2^# - 1, 3^# - 1] == 1 &] (* Vincenzo Librandi, May 01 2016 *)

A282902 Square array A(n, k) read by antidiagonals downwards: multiplicative order of 2 modulo prime(n)^k, where k runs over the positive integers.

Original entry on oeis.org

2, 6, 4, 18, 20, 3, 54, 100, 21, 10, 162, 500, 147, 110, 12, 486, 2500, 1029, 1210, 156, 8, 1458, 12500, 7203, 13310, 2028, 136, 18, 4374, 62500, 50421, 146410, 26364, 2312, 342, 11, 13122, 312500, 352947, 1610510, 342732, 39304, 6498, 253, 28, 39366, 1562500, 2470629, 17715610, 4455516, 668168, 123462, 5819, 812, 5
Offset: 2

Views

Author

Felix Fröhlich, Feb 24 2017

Keywords

Comments

The number of initial terms in row n with constant values is equal to the highest value of x such that p = prime(n) satisfies 2^(p-1) == 1 (mod p^x).
From Robert Israel, Feb 24 2017: (Start)
a(n,k+1) is either a(n,k) or a(n,k)*prime(n). If it is a(n,k)*prime(n), then a(n,k+j) = a(n,k)*prime(n)^j for all j>=1.
a(n,2) = a(n,1) if and only if prime(n) is a Wieferich prime (A001220).
(End)

Examples

			Array A(n, k) starts
   2,   6,   18,     54,     162,      486,      1458
   4,  20,  100,    500,    2500,    12500,     62500
   3,  21,  147,   1029,    7203,    50421,    352947
  10, 110, 1210,  13310,  146410,  1610510,  17715610
  12, 156, 2028,  26364,  342732,  4455516,  57921708
   8, 136, 2312,  39304,  668168, 11358856, 193100552
  18, 342, 6498, 123462, 2345778, 44569782, 846825858
		

Crossrefs

Cf. A014664 (column 1), A243905 (column 2).
Cf. A001220.

Programs

  • Maple
    seq(seq(numtheory:-order(2,ithprime(i)^(m-i)),i=2..m-1),m=2..10); # Robert Israel, Feb 24 2017
  • Mathematica
    A[n_, k_] := MultiplicativeOrder[2, Prime[n]^k];
    Table[A[n-k+1, k], {n, 2, 11}, {k, n-1, 1, -1}] // Flatten (* Jean-François Alcover, Mar 02 2020 *)
  • PARI
    a(n, k) = znorder(Mod(2, prime(n)^k))
    array(rows, cols) = for(n=2, rows+1, for(k=1, cols, print1(a(n, k), ", ")); print(""))
    array(7, 8) \\ print 7 X 8 array

A336719 Largest odd prime p for which the order of 2 mod p is at most n.

Original entry on oeis.org

3, 7, 7, 31, 31, 127, 127, 127, 127, 127, 127, 8191, 8191, 8191, 8191, 131071, 131071, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 524287, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647, 2147483647
Offset: 2

Views

Author

Jeppe Stig Nielsen, Aug 01 2020

Keywords

Comments

a(1) is undefined.
Changing "at most n" to "equal to n" in the definition gives A097406.
The first term that is not a Mersenne prime (A000668) is 4432676798593.
For a version without duplicates, see A336720. For a list of all n where a(n) increases, see A336721.

Crossrefs

Programs

  • PARI
    re=0;for(n=2,+oo,p=vecmax(factor(2^n-1)[,1]);p>re&&re=p;print1(re,", "))

A344202 Primes p such that gcd(ord_p(2), ord_p(3)) = 1.

Original entry on oeis.org

683, 599479, 108390409, 149817457, 666591179, 2000634731, 4562284561, 14764460089, 24040333283, 2506025630791, 5988931115977
Offset: 1

Views

Author

Sofia Lacerda, May 11 2021

Keywords

Comments

'ord_p' here means the multiplicative order, not to be confused with the p-adic order that is also often denoted by ord_p.
Related to Diophantine equations of the form (2^x-1)*(3^y-1) = n*z^2.

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], PrimeQ[#] && CoprimeQ[MultiplicativeOrder[2, #], MultiplicativeOrder[3, #]] &] (* Amiram Eldar, May 11 2021 *)
  • PARI
    isok(p) = isprime(p) && (gcd(znorder(Mod(2, p)), znorder(Mod(3, p))) == 1); \\ Michel Marcus, May 11 2021
    
  • Python
    from sympy.ntheory import n_order
    from sympy import gcd, nextprime
    A344202_list, p = [], 5
    while p < 10**9:
        if gcd(n_order(2,p),n_order(3,p)) == 1:
            A344202_list.append(p)
        p = nextprime(p) # Chai Wah Wu, May 12 2021

Extensions

a(3)-a(5) from Michel Marcus, May 11 2021
a(6)-a(8) from Amiram Eldar, May 11 2021
a(9) from Daniel Suteu, May 16 2021
a(10) from Sofia Lacerda, Jul 07 2021
a(11) from Sofia Lacerda, Aug 03 2021

A085430 a(n) is the minimal m such that the group GL(m,2) has an element of order n.

Original entry on oeis.org

2, 2, 3, 4, 4, 3, 5, 6, 6, 10, 5, 12, 5, 4, 9, 8, 8, 18, 7, 5, 12, 11, 7, 20, 14
Offset: 2

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 18 2003

Keywords

Comments

For n > 1, a(prime(n)) = A014664(n). Also, a(n) <= n. - Eric M. Schmidt, May 17 2013

Crossrefs

Cf. A002884.

Programs

  • GAP
    A085430 := function(n) local m; if IsPrime(n) and n>2 then return Order(2*Z(n)^0); fi; m := 1; while true do if ForAny(ConjugacyClasses(GL(m,2)), cc->Order(Representative(cc))=n) then return m; fi; m := m + 1; od; end; # Eric M. Schmidt, May 17 2013

Extensions

Sequence extended and corrected by Eric M. Schmidt, May 17 2013
Previous Showing 31-40 of 67 results. Next