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-10 of 10 results.

A279186 Maximal entry in n-th row of A279185.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 2, 2, 1, 1, 1, 2, 6, 1, 2, 4, 10, 1, 4, 2, 6, 2, 3, 1, 4, 1, 4, 1, 2, 2, 6, 6, 2, 1, 4, 2, 6, 4, 2, 10, 11, 1, 6, 4, 1, 2, 12, 6, 4, 2, 6, 3, 28, 1, 4, 4, 2, 1, 2, 4, 10, 1, 10, 2, 12, 2, 6, 6, 4, 6, 4, 2, 12, 1, 18, 4, 20, 2, 1, 6, 3, 4
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Comments

See A256608 for LCM of entries in row n.
From Robert Israel, Dec 15 2016: (Start)
If m and k are coprime then a(m*k) = lcm(a(m), a(k)).
If n is in A061345 and r = A053575(n) is in A167791, then a(n) = A000010(r). (End)

Crossrefs

Start is same as A256607 and A256608. However, all three are different.

Programs

  • Maple
    A279186 := proc(n)
        local a,k ;
        a := 1 ;
        for k from 0 to n-1 do
            a := max(a,A279185(k,n)) ;
        end do:
        a ;
    end proc : # R. J. Mathar, Dec 15 2016
  • 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]];
    a[n_] := Table[T[n, k], {k, 0, n - 1}] // Max;
    Array[a, 90] (* Jean-François Alcover, Nov 27 2017, after Robert Israel *)
  • PARI
    { A279186(n) = my(r=lcm(znstar(n)[2])); znorder(Mod(2,r>>valuation(r,2))); } \\ Max Alekseyev, Feb 02 2024

Formula

a(n) = A007733(A002322(n)). - Max Alekseyev, Feb 02 2024

A279187 Maximal entry in row c of A279185, where c = n-th composite number A002808(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 4, 2, 6, 2, 1, 1, 4, 1, 2, 2, 6, 2, 1, 2, 4, 2, 10, 1, 6, 4, 1, 2, 6, 4, 2, 6, 3, 1, 4, 2, 1, 2, 4, 1, 10, 2, 2, 6, 4, 6, 4, 2, 1, 18, 4, 2, 1, 6, 3, 4, 2, 2, 10, 4, 11, 6, 1, 6, 4, 4, 1, 2, 2, 12, 6, 4, 6, 2, 6, 10, 3, 2
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Comments

There are really two sequences that should be included if missing: the maximal entry in row c, and the LCM of the entries in row c.
a(n) and the LCM variant A256608(A002808(n)) are equal at least up to n<=1100. - R. J. Mathar, Dec 15 2016

Crossrefs

Cf. A002808, A256608 (lcm of entries in row n), A279185, A279186 (max entry in row n).

Programs

  • Maple
    A279187 := proc(n)
        A279186(A002808(n)) ;
    end proc :
    seq(A279187(n),n=1..180) ; # R. J. Mathar, Dec 15 2016
  • 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]]; Composite[n_] := FixedPoint[n + PrimePi[#] + 1&, n + PrimePi[n] + 1];
    a[n_] := a[n] = With[{c = Composite[n]}, Table[T[c, k], {k, 0, c-1}] // Max ];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 86}] (* Jean-François Alcover, Nov 27 2017, after Robert Israel *)

A279188 Maximal entry in row c of triangle in A279185, where c = prime(n)^2 = A001248(n).

Original entry on oeis.org

1, 2, 4, 6, 20, 12, 8, 18, 110, 84, 20, 36, 20, 42, 253, 156, 812, 60, 330, 420, 18, 156, 820, 110, 48, 100, 408, 2756, 36, 84, 42, 780, 136, 1518, 1332, 60, 156, 162, 6806, 1204, 1958, 180, 3420, 96, 588, 990, 420, 1332, 3164, 684, 812, 2856, 24, 100
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Comments

Needs to be checked (there are really two sequences that should be included: the maximal entry in row c, and the LCM of the entries in row c).

Crossrefs

Programs

  • Maple
    A279188 := proc(n)
        A279186(ithprime(n)^2) ;
    end proc :
    seq(A279188(n),n=1..80) ; # R. J. Mathar, Dec 15 2016
  • 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]];
    a[n_] := a[n] = With[{c = Prime[n]^2}, Table[T[c, k], {k, 0, c-1}] // Max];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 54}] (* Jean-François Alcover, Nov 27 2017, after Robert Israel *)

A256607 Eventual period of 2^(2^k) mod n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 2, 2, 1, 1, 1, 2, 6, 1, 2, 4, 10, 1, 4, 2, 6, 2, 3, 1, 4, 1, 4, 1, 2, 2, 6, 6, 2, 1, 4, 2, 3, 4, 2, 10, 11, 1, 6, 4, 1, 2, 12, 6, 4, 2, 6, 3, 28, 1, 4, 4, 2, 1, 2, 4, 10, 1, 10, 2, 12, 2, 6, 6, 4, 6, 4, 2, 12, 1, 18, 4, 20, 2, 1, 3
Offset: 1

Views

Author

Ivan Neretin, Apr 04 2015

Keywords

Comments

In other words, eventual period of 2 under the map x -> x^2 mod n.
a(n) is a divisor of A256608(n).

Examples

			For n=9 the map acts as follows: 2 -> 4 -> 7 -> 4 -> 7 and so on. This means the eventual period is 2, hence a(9)=2.
		

Crossrefs

First differs from A256608 at n=43.
Column 2 of triangle in A279185.

Programs

Formula

a(n) = A007733(A007733(n)).

A256608 Longest eventual period of a^(2^k) mod n for all a.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 2, 2, 1, 1, 1, 2, 6, 1, 2, 4, 10, 1, 4, 2, 6, 2, 3, 1, 4, 1, 4, 1, 2, 2, 6, 6, 2, 1, 4, 2, 6, 4, 2, 10, 11, 1, 6, 4, 1, 2, 12, 6, 4, 2, 6, 3, 28, 1, 4, 4, 2, 1, 2, 4, 10, 1, 10, 2, 12, 2, 6, 6, 4, 6, 4, 2, 12, 1, 18, 4, 20, 2, 1, 6
Offset: 1

Views

Author

Ivan Neretin, Apr 04 2015

Keywords

Comments

a(n) is a divisor of phi(phi(n)) (A010554).

Examples

			In other words, eventual period of {0..n-1} under the map x -> x^2 mod n.
For example, with n=10 the said map acts as follows. Read down the columns: the column headed 2 for example means that (repeatedly squaring mod 10), 2 goes to 4 goes to 16 = 6 (mod 10) goes to 36 = 6 mod 10 --- and has reached a fixed point.
0 1 2 3 4 5 6 7 8 9
0 1 4 9 6 5 6 9 4 1
0 1 6 1 6 5 6 1 6 1
0 1 6 1 6 5 6 1 6 1
and thus every number reaches a fixed point. This means the eventual common period is 1, hence a(10)=1.
		

Crossrefs

First differs from A256607 at n=43.
LCM of entries in row n of A279185.

Programs

  • Mathematica
    a[n_] := With[{lambda = CarmichaelLambda[n]}, MultiplicativeOrder[2, lambda / (2^IntegerExponent[lambda, 2])]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 28 2016 *)
  • PARI
    rpsi(n) = lcm(znstar(n)[2]); \\ A002322
    pb(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ A007733
    a(n) = pb(rpsi(n)); \\ Michel Marcus, Jan 28 2016

Formula

a(n) = A007733(A002322(n)).
a(prime(n)) = A037178(n). - Michel Marcus, Jan 27 2016

Extensions

Name changed by Jianing Song, Feb 02 2025

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

A343722 a(n) is the number of starting residues r modulo n from which repeated iterations of the mapping r -> r^2 mod n never reach a fixed point.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 8, 0, 8, 8, 0, 0, 0, 8, 16, 0, 12, 16, 20, 0, 16, 16, 16, 16, 24, 0, 28, 0, 24, 0, 20, 16, 32, 32, 24, 0, 32, 24, 40, 32, 20, 40, 44, 0, 40, 32, 0, 32, 48, 32, 40, 32, 48, 48, 56, 0, 56, 56, 48, 0, 40, 48, 64, 0, 60, 40, 68, 32
Offset: 1

Views

Author

Jon E. Schoenfield, Apr 27 2021

Keywords

Comments

a(n) = 0 iff n is a term of A003401, that is, A000010(n) is a power of 2.

Examples

			For every n >= 1, the residue r = 0 is a fixed point under the mapping r -> r^2 mod n, since we have 0 -> 0^2 mod n = 0. Also, for every n >= 2, the residue r = 1 is a fixed point, since we have 1 -> 1^2 mod n = 1.
For n=1, the only residue mod n is 0 (a fixed point), so a(1) = 0.
For n=2, the only residues are 0 and 1 (each a fixed point), so a(2) = 0.
For n=3, the only residue other than 0 and 1 is 2; 2 -> 2^2 mod 3 = 4 mod 3 = 1, a fixed point, so a(3) = 0.
For n=4, we have 0 -> 0, 1 -> 1, 2 -> 2^2 mod 4 = 4 mod 4 = 0, and 3 -> 3^2 mod 4 = 9 mod 4 = 1, each trajectory ending at a fixed point, so a(4) = 0.
For n=5, we have
  0 -> 0
  1 -> 1
  2 -> 4 -> 1 -> 1
  3 -> 4 -> 1 -> 1
  4 -> 1 -> 1
(each ending at a fixed point), so a(5) = 0.
For n=6, we have
  0 -> 0
  1 -> 1
  2 -> 4 -> 4
  3 -> 3
  4 -> 4
  5 -> 1 -> 1
(each ending at a fixed point), so a(6) = 0.
For n=7, however, we have
  0 -> 0
  1 -> 1
  2 -> 4 -> 2 -> ...       (a loop)
  3 -> 2 -> 4 -> 2 -> ...  (a loop)
  4 -> 2 -> 4 -> ...       (a loop)
  5 -> 4 -> 2 -> 4 -> ...  (a loop)
  6 -> 1 -> 1
so 4 of the 7 trajectories never reach a fixed point, so a(7)=4.
		

Crossrefs

Programs

  • PARI
    pos(list, r) = forstep (k=#list, 1, -1, if (list[k] == r, return (#list - k + 1)););
    isok(r, n) = {my(list = List()); listput(list, r); for (k=1, oo, r = lift(Mod(r, n)^2); my(i = pos(list, r)); if (i==1, return (1)); if (i>1, return(0)); listput(list, r); );} \\ reaches a fixed point
    a(n) = sum(r=0, n-1, 1 - isok(r, n)); \\ Michel Marcus, May 02 2021

Formula

a(n) is the number of terms of n-th row of A279185 that are greater than 1. - Pontus von Brömssen, Apr 27 2021
a(n) + A343721(n) = n. - Michel Marcus, May 02 2021

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

Original entry on oeis.org

7, 11, 13, 17, 23, 47, 59, 67, 71, 83, 103, 107, 131, 139, 167, 173, 191, 227, 239, 263, 269, 347
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Crossrefs

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

Original entry on oeis.org

53, 61, 97, 113, 149, 193, 349, 389, 461, 769, 773, 857, 941
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Crossrefs

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]/4, Print[p]]] (* Jean-François Alcover, Oct 07 2018, after Robert Israel in A279186 *)

Extensions

a(8)-a(13) from Jean-François Alcover, Oct 07 2018

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

Original entry on oeis.org

19, 31, 37, 43, 79, 199, 211, 223, 229, 277, 283, 367, 439, 463, 499, 523, 547, 619, 643, 692, 829, 859, 877, 907, 967, 997
Offset: 1

Views

Author

N. J. A. Sloane, Dec 14 2016

Keywords

Crossrefs

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]/6, Print[p]]] (* Jean-François Alcover, Oct 07 2018, after Robert Israel in A279186 *)

Extensions

More terms from Jean-François Alcover, Oct 07 2018
Showing 1-10 of 10 results.