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.

A290960 Numbers k such that A276976(k) > A270096(k).

Original entry on oeis.org

8, 32, 56, 64, 96, 128, 144, 155, 170, 176, 192, 196, 204, 215, 221, 224, 238, 248, 255, 256, 272, 288, 320, 322, 336, 341, 352, 368, 372, 374, 384, 432, 448, 465, 476, 496, 510, 512, 527, 544, 574, 576, 608, 612, 623, 635, 640, 644, 645, 658, 663, 672, 682, 697, 704, 714, 731, 736, 744
Offset: 1

Views

Author

Altug Alkan, Aug 15 2017, following a suggestion from N. J. A. Sloane

Keywords

Comments

Odd terms are 155, 215, 221, 255, 341, 465, 527, 623, 635, 645, 663, ...
These odd terms are odd numbers k such that (k mod A002322(k)) > (k mod A002326((k-1)/2)). - Amiram Eldar and Thomas Ordowski, Nov 28 2019

Examples

			8 is a term because A276976(8) = 4 while A270096(8) = 3.
		

Crossrefs

Programs

  • Maple
    A270096:= proc(n) local d, b, t, m, c;
      d:= padic:-ordp(n, 2);
      b:= n/2^d;
      t:= 2 &^ n mod n;
      m:= numtheory:-mlog(t, 2, b, c);
      if m < d then m:= m + c*ceil((d-m)/c) fi;
      m
    end proc:
    A270096(1):= 0:
    A276976:= proc(n) local lambda;
      lambda:= numtheory:-lambda(n);
      if n mod lambda = 0 then lambda
      elif n mod 8 = 0 and (n-2) mod lambda = 0 then lambda+2
      else n mod lambda
      fi
    end proc:
    A276976(1):= 0:
    A276976(8):= 4:
    A276976(24):= 4:
    select(n -> A276976(n) > A270096(n), [$1..1000]); # Robert Israel, Aug 16 2017
  • Mathematica
    With[{nn = 750}, Select[Range@ nn, Function[n, SelectFirst[Range[nn/4 + 10], Function[m, AllTrue[Range[2, n - 1], PowerMod[#, m , n] == PowerMod[#, n , n] &]]] > SelectFirst[Range[nn/4 + 10], PowerMod[2, n, n] == PowerMod[2, #, n] &]]]] (* Michael De Vlieger, Aug 15 2017 *)

A307625 Numbers k such that q = 2^k - 2^m + 1 is prime, where m = A270096(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 12, 13, 14, 16, 17, 19, 22, 31, 39, 45, 61, 76, 89, 94, 100, 102, 107, 122, 127, 294, 360, 430, 460, 521, 607, 639, 694, 732, 737, 952, 1279, 1581, 1983, 2061, 2203, 2281, 2319, 2410, 2530, 3217, 4253, 4423, 5324, 6846, 7011, 9615, 9689, 9904, 9941, 10841, 11213
Offset: 1

Views

Author

Thomas Ordowski, Apr 19 2019

Keywords

Comments

All primes in the sequence are the Mersenne exponents A000043.
It seems that the composite terms are composite numbers k <> 8 such that A307590(k) = 2.

Crossrefs

Programs

  • Mathematica
    b[n_] := Module[{k = 0}, While[PowerMod[2, n, n] != PowerMod[2, k, n], k++]; k]; aQ[n_] := PrimeQ[2^n - 2^b[n] + 1]; Select[Range[5000], aQ] (* Amiram Eldar, Apr 19 2019 *)
  • PARI
    f(n) = {my(m = 0); while (Mod(2, n)^m != 2^n, m++); m; } \\ A270096
    isok(n) = my(m = f(n)); isprime(2^n - 2^m + 1); \\ Michel Marcus, Apr 23 2019

Formula

q == 1 (mod k).

Extensions

More terms from Amiram Eldar, Apr 19 2019

A276976 Smallest m such that b^m == b^n (mod n) for every integer b.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 4, 5, 2, 9, 4, 1, 2, 1, 8, 3, 2, 11, 6, 1, 2, 3, 4, 1, 6, 1, 4, 9, 2, 1, 4, 7, 10, 3, 4, 1, 18, 15, 8, 3, 2, 1, 4, 1, 2, 3, 16, 5, 6, 1, 4, 3, 10, 1, 6, 1, 2, 15, 4, 17, 6, 1, 4, 27, 2, 1
Offset: 1

Views

Author

Thomas Ordowski, Sep 23 2016

Keywords

Comments

It suffices to check all bases 0 < b < n for n > 2.
The congruence n == a(n) (mod A002322(n)) is always true.
a(n) = 1 iff n is a prime or a Carmichael number.
We have a(n) > 0 for n > 1, and a(n) <= n/2.
If n > 2 then a(n) is odd iff n is odd.
Conjecture: a(n) <= n/3 for every n >= 9.
Professor Andrzej Schinzel proved this conjecture (in a letter to the author). - Thomas Ordowski, Sep 30 2016
Note: a(n) = n/3 for n = A038754 >= 3.
Numbers n such that a(n) > A270096(n) are A290960.
Information from Carl Pomerance: a(n) > A002322(n) if and only if 8|n and n is in A050990; such n = 8, 24, 56, ... - Thomas Ordowski, Jun 21 2017
Number of integers k < n such that b^k == b^n (mod n) for every integer b is f(n) = (n - a(n))/lambda(n). For n > 1, f(n) = floor((n-1)/lambda(n)) if and only if a(n) <= lambda(n), where lambda(n) = A002322(n). - Thomas Ordowski, Jun 21 2017
a(n) >= A051903(n); numbers n such that a(n) = A051903(n) are 1, primes, Carmichael numbers, and A327295. - Thomas Ordowski, Dec 06 2019

Crossrefs

Programs

  • Mathematica
    With[{nn = 83}, Table[SelectFirst[Range[nn/4 + 10], Function[m, AllTrue[Range[2, n - 1], PowerMod[#, m , n] == PowerMod[#, n , n] &]]] - Boole[n == 1], {n, nn}]] (* Michael De Vlieger, Aug 15 2017 *)
    a[1] = 0; a[8] = a[24] = 4; a[n_] := If[(rem = Mod[n, (lam = CarmichaelLambda[n])]) >= Max @@ Last /@ FactorInteger[n], rem, rem + lam]; Array[a, 100] (* Amiram Eldar, Nov 30 2019 *)
  • PARI
    a(n)=if(n<3, return(n-1)); forstep(m=1,n,n%2+1, for(b=0,n-1, if(Mod(b,n)^m-Mod(b,n)^n, next(2))); return(m)) \\ Charles R Greathouse IV, Sep 23 2016
    
  • Python
    def a(n): return next(m for m in range(0, n+1) if all(pow(b,m,n)==pow(b,n,n) for b in range(1, 2*n+1))) # Nicholas Stefan Georgescu, Jun 03 2022

Formula

a(p) = 1 for prime p.
a(2*p) = 2 for prime p.
a(3*p) = 3 for odd prime p.
a(p^k) = p^(k-1) for odd prime p and k >= 1.
a(2*p^k) = 2*p^(k-1) for odd prime p and k >= 1.
a(2^k) = 2^(k-2) for k >= 4.
From Thomas Ordowski, Jul 09 2017: (Start)
Full description of the function:
a(n) = lambda(n) if lambda(n)|n except n = 1, 8, and 24;
a(n) = lambda(n)+2 if lambda(n)|(n-2) and 8|n;
a(n) = n mod lambda(n) otherwise;
where lambda(n) = A002322(n). (End)
For n <> 8 and 24, a(n) = A(n) if A(n) >= A051903(n) or a(n) = A002322(n) + A(n) otherwise, where A(n) = A219175(n). - Thomas Ordowski, Nov 30 2019

Extensions

More terms from Altug Alkan, Sep 23 2016

A327295 Numbers k such that e(k) > 1 and k == e(k) (mod lambda(k)), where e(k) = A051903(k) is the maximal exponent in prime factorization of k.

Original entry on oeis.org

4, 12, 16, 48, 80, 112, 132, 208, 240, 1104, 1456, 1892, 2128, 4144, 5852, 12208, 17292, 18544, 21424, 25456, 30160, 45904, 78736, 97552, 106384, 138864, 153596, 154960, 160528, 289772, 311920, 321904, 399212, 430652, 545584, 750064, 770704, 979916, 1037040, 1058512
Offset: 1

Views

Author

Thomas Ordowski, Dec 05 2019

Keywords

Comments

The condition e(k) > 1 excludes primes and Carmichael numbers.
Numbers n such that e(k) > 1 and b^k == b^e(k) (mod k) for all b.
These are numbers k such that A276976(k) = e(k) > 1.
Are there infinitely many such numbers? Are all such numbers even?
A number k is a term if and only if k is e(k)-Knödel number with e(k) > 1. So they may have the name nonsquarefree e(k)-Knodel numbers k.
It seems that if k is in this sequence, then e(k) = A007814(k) and k/2^e(k) is squarefree.
Conjecture: there are no composite numbers m > 4 such that m == e(m) (mod phi(m)). By Lehmer's totient conjecture, there are no such squarefree numbers.
Problem: are there odd numbers n such that e(n) > 1 and n == e(n) (mod ord_{n}(2)), where ord_{n}(2) = A002326((n-1)/2)? These are odd numbers n such that 2^n == 2^e(n) (mod n) with e(n) > 1.
Numbers k for which A051903(k) > 1 and A219175(k) = A329885(k). - Antti Karttunen, Dec 11 2019

Examples

			The number 4 = 2^2 is a term, because e(4) = A051903(4) = 2 > 1 and 4 == 2 (mod lambda(4)), where lambda(4) = A002322(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], (e = Max @@ Last /@ FactorInteger[#]) > 1 && Divisible[# -e, CarmichaelLambda[#]] &] (* Amiram Eldar, Dec 05 2019 *)
  • PARI
    isok(n) = ! issquarefree(n) && (Mod(n, lcm(znstar(n)[2])) == vecmax(factor(n)[, 2])); \\ Michel Marcus, Dec 05 2019

Extensions

More terms from Amiram Eldar, Dec 05 2019

A385989 a(n) is the least m > n such that 2^n and 2^m are congruent modulo n.

Original entry on oeis.org

2, 3, 5, 5, 9, 8, 10, 9, 15, 14, 21, 14, 25, 17, 19, 17, 25, 24, 37, 24, 27, 32, 34, 26, 45, 38, 45, 31, 57, 34, 36, 33, 43, 42, 47, 42, 73, 56, 51, 44, 61, 48, 57, 54, 57, 57, 70, 50, 70, 70, 59, 64, 105, 72, 75, 59, 75, 86, 117, 64, 121, 67, 69, 65, 77, 76
Offset: 1

Views

Author

Rémy Sigrist, Jul 14 2025

Keywords

Crossrefs

See A270096 for a similar sequence.
Cf. A007733.

Programs

  • Mathematica
    a[n_]:=Module[{m=n+1},While[PowerMod[2,n,n]!=PowerMod[2,m,n], m++]; m]; Array[a,66] (* Stefano Spezia, Jul 16 2025 *)
  • PARI
    a(n) = { my (u = Mod(2, n)^n, v = u); for (m = n+1, oo, if (u==v*=2, return (m));); }

Formula

a(2^k) = 2^k + 1 for any k >= 0.
a(n) <= n + A007733(n).

A277129 Largest m < n such that 2^m == 2^n (mod n).

Original entry on oeis.org

0, 1, 1, 3, 1, 4, 4, 7, 3, 6, 1, 10, 1, 11, 11, 15, 9, 12, 1, 16, 15, 12, 12, 22, 5, 14, 9, 25, 1, 26, 26, 31, 23, 26, 23, 30, 1, 20, 27, 36, 21, 36, 29, 34, 33, 35, 24, 46, 28, 30, 43, 40, 1, 36, 35, 53, 39, 30, 1, 56, 1, 57, 57, 63, 53, 56, 1, 60, 47, 58, 36, 66, 64, 38, 55, 58, 47, 66, 40, 76, 27, 62, 1
Offset: 1

Views

Author

Thomas Ordowski, Oct 01 2016

Keywords

Comments

If n is odd, then a(n) = n - A002326((n-1)/2).

Crossrefs

Programs

  • Mathematica
    Table[m = n - 1; While[Mod[2^m, n] != Mod[2^n, n], m--]; m, {n, 83}] (* Michael De Vlieger, Oct 02 2016 *)
  • PARI
    a(n) = {if(n==0,return(0));my(pt = valuation(n, 2), odd = n/2^pt, ul = odd-A002326(odd\2)); forstep(i = n-1, ul, -1, if(Mod(2,n)^i==Mod(2,n)^n,return(i)))} \\ David A. Corneth, Oct 01 2016
    A002326(n)=if(n<0, 0, znorder(Mod(2, 2*n+1)))

Extensions

More terms from Altug Alkan, Oct 01 2016
Showing 1-6 of 6 results.