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

A329895 Lexicographically earliest infinite sequence such that a(i) = a(j) => A219175(i) = A219175(j) and A289625(i) = A289625(j) for all i, j.

Original entry on oeis.org

1, 1, 2, 3, 4, 3, 5, 6, 7, 8, 9, 6, 10, 11, 12, 13, 14, 15, 16, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 32, 38, 39, 40, 41, 42, 36, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 49, 68, 69, 70, 71, 72, 73, 74, 75, 65, 76, 77, 78, 79, 80, 70, 81, 82, 83
Offset: 1

Views

Author

Antti Karttunen, Dec 07 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A219175(n), A289625(n)].
For all i, j:
a(i) = a(j) => A327979(i) = A327979(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A219175(n) = (n%lcm(znstar(n)[2]));
    A289625(n) = { my(m=1,p=2,v=znstar(n)[2]); for(i=1,length(v),m *= p^v[i]; p = nextprime(p+1)); (m); };
    Aux329895(n) = [A219175(n),A289625(n)];
    v329895 = rgs_transform(vector(up_to, n, Aux329895(n)));
    A329895(n) = v329895[n];

A329896 Lexicographically earliest infinite sequence such that a(i) = a(j) => A219175(i) = A219175(j) and A322592(i) = A322592(j) for all i, j.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 2, 4, 5, 6, 2, 4, 2, 7, 8, 9, 2, 10, 2, 9, 11, 12, 2, 13, 14, 15, 16, 17, 2, 18, 2, 19, 20, 21, 22, 23, 2, 24, 25, 26, 2, 23, 2, 27, 28, 29, 2, 26, 30, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 26, 2, 39, 40, 41, 42, 43, 2, 44, 45, 46, 2, 47, 2, 48, 35, 49, 50, 51, 2, 52, 53, 54, 2, 47, 55, 56, 57, 58, 2, 51, 59, 60, 61, 62, 63, 64, 2, 65, 66, 67, 2, 68, 2, 69, 70
Offset: 1

Views

Author

Antti Karttunen, Dec 07 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A219175(n) = (n%lcm(znstar(n)[2]));
    A289625(n) = { my(m=1,p=2,v=znstar(n)[2]); for(i=1,length(v),m *= p^v[i]; p = nextprime(p+1)); (m); };
    Aux329896(n) = if((n>2)&&isprime(n),0,[A219175(n),A289625(n)]);
    v329896 = rgs_transform(vector(up_to, n, Aux329896(n)));
    A329896(n) = v329896[n];

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
Showing 1-4 of 4 results.