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.

User: Bernat Pagès Vives

Bernat Pagès Vives's wiki page.

Bernat Pagès Vives has authored 3 sequences.

A347560 a(n) is the number of solutions to Conv(b,n)=b where Conv(b,n) denotes the limit of b^^t (mod n) as t goes to infinity.

Original entry on oeis.org

2, 2, 3, 2, 5, 4, 5, 4, 5, 3, 8, 3, 7, 8, 7, 4, 9, 3, 10, 8, 8, 5, 14, 6, 9, 4, 12, 6, 15, 9, 7, 10, 9, 10, 14, 4, 9, 10, 18, 7, 19, 5, 13, 14, 10, 3, 20, 10, 13, 12, 14, 7, 9, 12, 20, 10, 13, 7, 28, 9, 15, 21, 11, 17, 24, 10, 14, 13, 22, 15, 24, 7, 9, 17, 17, 20, 24, 10, 28
Offset: 2

Author

Bernat Pagès Vives, Sep 06 2021

Keywords

Comments

Writing n = m^(2k), a(n) >= 2^A001221(n) + m^k - 1.
Writing n = m^(2k+1), a(n) >= 2^A001221(n) + m^k - 1.
If n is in A101793, then a(n) = 3.
It appears that a(n) = 2 only for n = 2, 3, 5.
It appears that a(n) = 3 only for n = 4, 11, 13, 19 and for n in A101793.
It is not known whether there exist infinitely many numbers n satisfying a(n) = 3.

Examples

			For n = 100, pick b = 3.
3^^1 ==  3 (mod 100)
3^^2 == 27 (mod 100)
3^^3 == 87 (mod 100)
3^^4 == 87 (mod 100)
3^^5 == 87 (mod 100)
...
It can be proved that the sequence converges to 87, so Conv(3,100) = 87. Since b = 3 does not satisfy Conv(b,100) = b, this value is not counted in a(100).
For n = 7, pick b = 2.
2^^1 == 2 (mod 7)
2^^2 == 4 (mod 7)
2^^3 == 2 (mod 7)
2^^4 == 2 (mod 7)
2^^5 == 2 (mod 7)
...
It can be proved that the sequence converges to 2, so Conv(2,7) = 2. Thus, 2 is a solution for a(7). The other 3 solutions are 0, 1 and 4 giving a total of a(7) = 4 solutions.
		

Programs

  • Mathematica
    Conv[b_,n_] :=
    Which[
    Mod[b,n]==0,Return[0],
    Mod[b,n]==1,Return[1],
    GCD[b,n]==1,Return[PowerMod[b,Conv[b,MultiplicativeOrder[b,n]],n]],
    True,Return[PowerMod[b,EulerPhi[n]+Conv[b,EulerPhi[n]],n]]
    ]
    a[n_] := Count[Table[Conv[b,n]==b,{b,0,n-1}],True]
  • PARI
    conv(b, n) = {if (b % n == 0, return (0)); if (b % n == 1, return (1)); if (gcd(b, n)==1, return (lift(Mod(b, n)^conv(b, lift(znorder(Mod(b, n))))))); lift(Mod(b, n)^(eulerphi(n) + conv(b, eulerphi(n))));}
    a(n) = sum(b=0, n-1, conv(b, n) == b); \\ Michel Marcus, Sep 13 2021

A347561 Numbers m such that Conv(b,m) = b has a unique nontrivial solution (b = 0 and b = 1 are considered trivial solutions). Here, Conv(b,m) denotes the limit of b^^t (mod m) as t goes to infinity.

Original entry on oeis.org

4, 11, 13, 19, 47, 719, 1439, 2879, 4079, 4127, 5807, 6047, 7247, 7727, 9839, 10799, 11279, 13967, 14159, 15647, 21599, 24527, 28319, 28607, 42767, 44687, 45887, 48479, 51599, 51839, 67247, 68639, 72767, 77279, 79967, 81647, 84047, 84719, 89087
Offset: 1

Author

Bernat Pagès Vives, Sep 06 2021

Keywords

Comments

A101793 is a subsequence.
It appears that a(n) = A101793(n-4) for n>=5.
Except for n = 1, a(n) is prime.

Examples

			For a(2), we have:
Conv(2,11) = 9
Conv(3,11) = 9
Conv(4,11) = 4
Conv(5,11) = 1
Conv(6,11) = 5
Conv(7,11) = 2
Conv(8,11) = 3
Conv(9,11) = 5
Conv(10,11) = 1
Therefore, the only solution is Conv(4,11) = 4.
		

Crossrefs

Programs

  • Mathematica
    Conv[b_,m_] :=
    Which[
    Mod[b,m]==0,Return[0],
    Mod[b,m]==1,Return[1],
    GCD[b,m]==1,Return[PowerMod[b,Conv[b,MultiplicativeOrder[b,m]],m]],
    True,Return[PowerMod[b,EulerPhi[m]+Conv[b,EulerPhi[m]],m]]
    ]
    a[m_] := Count[Table[Conv[b,m]==b,{b,0,m-1}],True]
    Table[If[a[i]==3,i,## &[]],{i,2,800}]
  • PARI
    conv(b, n) = {if (b % n == 0, return (0)); if (b % n == 1, return (1)); if (gcd(b, n)==1, return (lift(Mod(b, n)^conv(b, lift(znorder(Mod(b, n))))))); lift(Mod(b, n)^(eulerphi(n) + conv(b, eulerphi(n))));}
    isok(m) = sum(b=2, m-1, conv(b, m) == b) == 1; \\ Michel Marcus, Sep 13 2021

A343073 a(n) is the number of integers 0 < b < n such that b^^x == 1 (mod n) has a solution; ^^ denotes the tetration operation (cf. A321312).

Original entry on oeis.org

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

Author

Bernat Pagès Vives, Apr 04 2021

Keywords

Comments

If the same definition were used, but with b^x instead of b^^x, then a(n) would be A000010(n), the Euler Totient Function.
A019434 plays a special role for this sequence. a(A019434(n)) = (A019434(n)+1)/2, since all even numbers b satisfy the condition, and b=1 is the only odd number that satisfies it. This can be easily proved with the Fermat-Euler Theorem.
a(n) <= A000010(n), since gcd(b,n)=1 is a necessary condition. There is equality when n = 2 and n = 3. It is a conjecture that there are no more equality cases.
The sequence A239063 gives exactly the numbers n where a(n) = 1. This means that if b^^2 == 1 (mod n) has no solutions with 1 < b < n, then neither will b^^x == 1 (mod n).

Examples

			For n = 5,
Setting b = 1, x = 1 gives 1^^1 == 1 (mod 5).
Setting b = 2, x = 3 gives 2^^3 == 2^8 == 1 (mod 5).
Setting b = 3 has no solutions, since 3^^x == 2 (mod 5) for all x > 1.
Setting b = 4, x = 2 gives 4^^2 == 1 (mod 5).
Thus there are 3 possible values of b, and that is the value of a(5).
		

Crossrefs

Programs

  • Mathematica
    Tetration[a_,b_,mod_]:=
        Which[
            Mod[a,mod]==0, 0,
            b == 1,Mod[a,mod],
            b==2,PowerMod[a,a,mod],
            b==3&&a==2,Mod[16,mod],
            True,PowerMod[a,Mod[(Tetration[a,b-1,EulerPhi[mod]]-Floor[Log[2,mod]]),EulerPhi[mod]]+Floor[Log[2,mod]],mod]]
    TetraInv[n_,mod_,it_]:=
        Which[
            GCD[n,mod]!=1 ,0,
            it==LambdaRoot[mod]+1,0,
            Tetration[n,it,mod]==1,it,
            True,TetraInv[n,mod,it+1]
    ]
    LambdaRoot[n_]:=Module[{counter,it},
        counter = 0;
        it = n;
        While[it!=1,
            it = CarmichaelLambda[it];
            counter++;
        ];
        counter
    ]
    a[n_] := Module[{counter ,t},
        counter = 0;
        For[j=1,j<=n,j++,
            t =TetraInv[j,n,1];
            If[t!=0,counter++]
        ];
        counter
    ]

Formula

If n is a Fermat prime, a(n) = (n+1)/2.
If n is a power of 2, a(n) = 1.