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

A262043 Carmichael numbers (A002997) that are not absolute Euler pseudoprimes (A033181).

Original entry on oeis.org

561, 1105, 2821, 6601, 8911, 10585, 29341, 52633, 62745, 63973, 101101, 115921, 126217, 188461, 252601, 278545, 294409, 314821, 334153, 340561, 410041, 512461, 552721, 658801, 748657, 825265, 852841, 1024651, 1033669, 1082809, 1152271, 1193221, 1461241, 1569457, 1909001
Offset: 1

Views

Author

Daniel Lignon, Sep 09 2015

Keywords

Comments

These are composite numbers n such that b^(n-1) == 1 (mod n) and abs(b^((n-1)/2) mod n) <> 1 for every b coprime to n.

Crossrefs

Cf. A002997 (Carmichael numbers), A033181 (absolute Euler pseudoprimes).

A309316 Euler primary pretenders: a(n) is the smallest odd composite k such that n^((k+1)/2) == +-n (mod k).

Original entry on oeis.org

9, 9, 341, 121, 341, 15, 15, 21, 9, 9, 9, 33, 33, 21, 15, 15, 15, 9, 9, 9, 15, 15, 21, 33, 15, 15, 9, 9, 9, 15, 15, 15, 25, 33, 21, 9, 9, 9, 39, 15, 15, 21, 21, 21, 9, 9, 9, 65, 21, 21, 15, 15, 39, 9, 9, 9, 21, 21, 57, 15, 15, 15, 9, 9, 9, 15, 15, 33, 25, 15, 15, 9, 9, 9, 15, 15, 15, 21, 21, 39, 9, 9, 9
Offset: 0

Views

Author

Thomas Ordowski, Jul 23 2019

Keywords

Comments

Note that if p is an odd prime, then n^((p+1)/2) == +-n (mod p) for all n.
a(n) is the least Euler weak pseudoprime to base n, as A000790(n) is the least Fermat weak pseudoprime to base n.
This sequence is bounded, namely a(n) <= 1729, the smallest absolute Euler pseudoprime, because n^((1729+1)/2) == n (mod 1729) for every n, see A033181.
The set A = {a(n)} of terms contains all odd semiprimes pq < 1729 such that p-1 | q-1. Other numbers in the set are 561, 645, 1065, 1247, and 1729. Probably complete. Cf. A108574.
This sequence is periodic with a very long period P = LCM(A) = p#*q#/2^2, where p and q are the largest primes such that p^2 < 1729 and 3q < 1729. Such primes are p = 41 and q = 571, so the period P = 41#*571#/4 (248 digits) is much longer than period of the (Fermat) primary pretenders.
Problem: is P the fundamental period of this sequence?
Records of a(n) are 9, 341, 561, 703, 793, 1145, 1263, 1477, and 1729; for n = 0, 2, 383, 1822, 3308, 4702, 10103, 12252, and 21821. - Amiram Eldar, Jul 24 2019

Examples

			a(2) = 341 since 2^((341+1)/2) = 2^171 == 2 (mod 341) and 341 is the smallest odd composite number satisfying this congruence.
a(5) = 15 since 5^((15+1)/2) = 5^8 == -5 (mod 15) and 15 is the smallest odd composite number with this property.
a(8) = 9 since 8^((9+1)/2) = 8^5 == 8 (mod 9) and 9 is the smallest odd composite number.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,r;
      for k from 9 by 2 do
        if isprime(k) then next fi;
        r:= n &^ ((k+1)/2) mod k;
        if r = (n mod k) or r = (-n mod k) then return k fi
      od
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 23 2019
  • Mathematica
    a[n_] := Module[{k=9}, While[!CompositeQ[k] || ((m = PowerMod[n, (k+1)/2, k]) != Mod[n, k] && m != Mod[-n, k]), k+=2]; k]; Array[a, 100, 0] (* Amiram Eldar, Jul 23 2019 *)

Formula

a(n) = 9 if and only if n == {-1,0,1} (mod 9).
a(n + P) = a(n), where the period P = 41#*571#/4.

Extensions

More terms from Amiram Eldar, Jul 23 2019

A366982 a(n) is the smallest odd k > 1 such that n^((k+1)/2) == n (mod k).

Original entry on oeis.org

3, 3, 7, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 11, 3, 3, 5, 3, 3, 5, 3, 3, 11, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 13, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 17, 3, 3
Offset: 0

Views

Author

Thomas Ordowski, Oct 30 2023

Keywords

Comments

If this sequence is bounded, then it is periodic with period P = LCM(A), where A is the set of all (pairwise distinct) terms.
Note that n^((1729+1)/2) == n (mod 1729) for every n >= 0, where 1729 is the smallest absolute Euler pseudoprime (A033181).
Thus a(n) <= 1729. So, as said, this sequence is periodic.
What is its period?
If the largest term of this sequence is indeed 1729, it should be expected that its period P may be longer than the period of Euler primary pretenders (A309316), namely P > 41#*571#/4 (248 digits).

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 3}, While[PowerMod[n, (k + 1)/2, k] != Mod[n, k], k += 2]; k]; Array[a, 100, 0] (* Amiram Eldar, Oct 30 2023 *)
  • PARI
    a(n) = my(k=3); while (Mod(n, k)^((k+1)/2) != n, k+=2); k; \\ Michel Marcus, Oct 31 2023

Extensions

More terms from Amiram Eldar, Oct 30 2023

A295835 Numbers k == 3 (mod 4) such that 2^((k-1)/2), 3^((k-1)/2) and 5^((k-1)/2) are congruent to 1 (mod k).

Original entry on oeis.org

71, 191, 239, 311, 359, 431, 479, 599, 719, 839, 911, 1031, 1151, 1319, 1439, 1511, 1559, 1871, 2039, 2111, 2351, 2399, 2591, 2711, 2879, 2999, 3119, 3191, 3359, 3671, 3719, 3911, 4079, 4271, 4391, 4679, 4751, 4799, 4871, 4919, 5039, 5231, 5279, 5351, 5399, 5471
Offset: 1

Views

Author

Jonas Kaiser, Nov 28 2017

Keywords

Comments

There are very few composite numbers in this sequence: The probability of catching a pseudoprime number (A001567) with this definition is estimated at 1 in 263 billion.
Composite numbers in the sequence include the Carmichael numbers 131314855918751, 23282264781147191, 70122000249565031, 104782993259720471, 583701149409931151, 870012810301712351. - Robert Israel, Nov 28 2017
With the exception of the pseudoprimes, it seems that this is a subsequence of A139035. Primes of this form (A139035) have two special properties. 1. There exists a smallest m of the form m = (A139035 - 1)/2 such that 2^m == 1 (mod A139035). 2. m is odd. The core of this definition is based on these two properties. The term 2^((k-1)/2) == 1 (mod n) is based on the first property, while the term k == 3 (mod 4) is based on the second property. The terms 3^((k-1)/2) == 1 (mod n) and 5^((k-1)/2) == 1 (mod n) I just tried freely to Fermat.
Prime terms are congruent to 71 or 119 modulo 120. - Jianing Song, Nov 22 2018 [This is because 2, 3, and 5 must be quadratic residues modulo every prime number in this sequence. - Jianing Song, Sep 01 2024]
From Jianing Song, Sep 03 2024: (Start)
Compare this sequence to the sequence of absolute Euler pseudoprimes (A033181): odd composite numbers k such that a^((k-1)/2) == +-1 (mod k) for every a coprime to k. Such numbers k satisfy 2*psi(k) | (k-1), where psi = A002322, so we must have k == 1 (mod 4).
All terms in this sequence are congruent to 7 modulo 8. In fact, taking the Jacobi symbol modulo k (which only depends on the remainder modulo k) of both sides of 2^((k-1)/2) == 1 (mod k) yields (2/k)^((k-1)/2) = 1. Since k == 3 (mod 4), we have that (k-1)/2 is odd, so (2/k) = 1, which means that k == 7 (mod 8). (End)
Those numbers given above by Robert Israel are all congruent to 71 modulo 120. There are no known composite terms congruent to 119 modulo 120; cf. A294092. - Bill McEachen and Jianing Song, Sep 05 2024

Crossrefs

A294092 is a subsequence.

Programs

  • Maple
    filter:= proc(n) [2&^((n-1)/2),3&^((n-1)/2), 5&^((n-1)/2)] mod n = [1,1,1]  end proc:
    select(filter, [seq(i,i=3..10000,4)]); # Robert Israel, Nov 28 2017, corrected Feb 26 2018
  • Mathematica
    fQ[n_] := PowerMod[{2, 3, 5}, (n - 1)/2, n] == {1, 1, 1}; Select[3 + 4Range@ 1500, fQ] (* Michael De Vlieger, Nov 28 2017 and slightly modified by Robert G. Wilson v, Feb 26 2018 based on the renaming *)
  • PARI
    is(n) = n%4==3 && Mod(2, n)^(n\2)==1 && Mod(3, n)^(n\2)==1 && Mod(5, n)^(n\2)==1 && Mod(2, n)^logint(n+1,2)!=1 \\ Charles R Greathouse IV, Nov 28 2017

Extensions

Definition corrected by Jonas Kaiser, Feb 05 2018

A307798 The "residue" pseudoprimes: odd composite numbers n such that q(n)^((n-1)/2) == 1 (mod n), where base q(n) is the smallest prime quadratic residue modulo n.

Original entry on oeis.org

121, 561, 1105, 1541, 1729, 1905, 2465, 4033, 5611, 8321, 8481, 10585, 15709, 15841, 16297, 18705, 18721, 19345, 25761, 28009, 29341, 30121, 31697, 33153, 34945, 42799, 44173, 46657, 49141, 52633, 55969, 62745, 63973, 65077, 69781, 75361, 76627, 79381, 82513, 85489, 88573, 90241, 102311
Offset: 1

Views

Author

Thomas Ordowski, Apr 29 2019

Keywords

Comments

As is well known, for an odd prime p, a prime q is a quadratic residue modulo p if and only if q^((p-1)/2) == 1 (mod p). Hence the above definition of these pseudoprimes.
Such pseudoprimes n which are both "residue" and "non-residue", obviously to different bases q(n) and b(n), are particularly interesting: 29341, 49141, 1251949, 1373653, 2284453, ... These five numbers are in A244626.
Note that the absolute Euler pseudoprimes are odd composite numbers n such that b^((n-1)/2) == 1 (mod n) for every base b that is a quadratic residue modulo n and coprime to n. There are no odd composite numbers n such that b^((n-1)/2) == -1 (mod n) for every base b that is a quadratic non-residue modulo n and coprime to n. The absolute Euler-Jacobi pseudoprimes do not exist.

Examples

			3^((121-1)/2) == 1 (mod 121), 2^((561-1)/2) == 1 (mod 561), ...
		

Crossrefs

Cf. A002997, A033181, A306530, A307767 (the "non-residue" pseudoprimes).

Programs

  • Mathematica
    q[n_] := Module[{p = 2, pn = Prime[n]}, While[JacobiSymbol[p, pn] != 1, p = NextPrime[p]]; p]; aQ[n_] := CompositeQ[n] && PowerMod[q[n], (n - 1)/2, n] == 1; Select[Range[3, 110000, 2], aQ] (* Amiram Eldar, Apr 29 2019 *)

Extensions

More terms from Amiram Eldar, Apr 29 2019

A366930 a(n) is the smallest odd composite k such that n^((k+1)/2) == n (mod k).

Original entry on oeis.org

9, 9, 341, 121, 341, 65, 15, 21, 9, 9, 9, 33, 33, 21, 21, 15, 15, 9, 9, 9, 21, 15, 21, 33, 25, 15, 9, 9, 9, 21, 15, 15, 25, 33, 21, 9, 9, 9, 57, 39, 15, 21, 21, 21, 9, 9, 9, 65, 21, 21, 21, 15, 39, 9, 9, 9, 21, 21, 57, 145, 15, 15, 9, 9, 9, 33, 15, 33, 25, 21
Offset: 0

Views

Author

Thomas Ordowski, Nov 01 2023

Keywords

Comments

If this sequence is bounded, then it is periodic with period P = LCM(A), where A is the set of all (pairwise distinct) terms.
Note that n^((1729+1)/2) == n (mod 1729) for every n >= 0, where 1729 is the smallest absolute Euler pseudoprime (A033181).
Thus a(n) <= 1729. So, as said, this sequence is periodic.
What is its period?
The period P of this sequence may be longer than the period of Euler primary pretenders (A309316), namely P > 41#*571#/4 (248 digits).

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 9}, While[PrimeQ[k] || PowerMod[n, (k + 1)/2, k] != Mod[n, k], k += 2]; k]; Array[a, 100, 0] (* Amiram Eldar, Nov 01 2023 *)
  • PARI
    a(n) = my(k=3); while (isprime(k) || Mod(n, k)^((k+1)/2) != n, k+=2); k; \\ Michel Marcus, Nov 01 2023

Formula

a(n) >= A309316(n).

A307864 a(n) is the number of natural bases b < 2n+1 such that b^n == 1 (mod 2n+1).

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 6, 1, 8, 9, 4, 11, 4, 1, 14, 15, 4, 1, 18, 1, 20, 21, 4, 23, 6, 1, 26, 1, 4, 29, 30, 1, 16, 33, 4, 35, 36, 1, 4, 39, 2, 41, 4, 1, 44, 9, 4, 1, 48, 1, 50, 51, 16, 53, 54, 1, 56, 1, 4, 1, 10, 1, 2, 63, 4, 65, 36, 1, 68, 69, 4, 1, 16, 1, 74, 75, 8, 1, 78, 1, 4, 81, 8, 83, 12, 1, 86
Offset: 0

Views

Author

Thomas Ordowski, May 02 2019

Keywords

Comments

For n > 0, a(n) = n if and only if 2n+1 is prime.
If a(n) < n, then 2n+1 is composite.
Theorem: a(n) > n if and only if 2n+1 is an absolute Euler pseudoprime.
Conjecture: if 2n+1 is an absolute Euler pseudoprime, then a(n) = phi(2n+1).

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Range[2n], PowerMod[#, n, 2n+1] == 1 &]]; Array[a, 100] (* Amiram Eldar, May 02 2019 *)
  • PARI
    a(n) = sum(b=1, 2*n, Mod(b, 2*n+1)^n == 1); \\ Michel Marcus, May 02 2019

Extensions

More terms from Amiram Eldar, May 02 2019

A307865 a(n) is the number of natural bases b < 2n+1 such that b^n == -1 (mod 2n+1).

Original entry on oeis.org

0, 1, 2, 3, 0, 5, 6, 1, 8, 9, 0, 11, 0, 1, 14, 15, 0, 1, 18, 1, 20, 21, 0, 23, 0, 1, 26, 1, 0, 29, 30, 1, 0, 33, 0, 35, 36, 1, 0, 39, 0, 41, 4, 1, 44, 9, 0, 1, 48, 1, 50, 51, 0, 53, 54, 1, 56, 1, 0, 1, 0, 1, 2, 63, 0, 65, 0, 1, 68, 69, 0, 1, 0, 1, 74, 75, 0, 1, 78, 1, 0, 81, 0, 83, 0, 1, 86
Offset: 0

Views

Author

Thomas Ordowski, May 02 2019

Keywords

Comments

For n > 0, a(n) = n if and only if 2n+1 is prime.
Note that a(n) < n if and only if 2n+1 is composite.
Conjecture: if 2n+1 is an absolute Euler pseudoprime, then a(n) = 0.

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Range[2n], PowerMod[#, n, 2n+1] == 2n &]]; Array[a, 100] (* Amiram Eldar, May 02 2019 *)
  • PARI
    a(n) = sum(b=1, 2*n, Mod(b, 2*n+1)^n == -1); \\ Michel Marcus, May 02 2019

Extensions

More terms from Amiram Eldar, May 02 2019

A329759 Odd composite numbers k for which the number of witnesses for strong pseudoprimality of k equals phi(k)/4, where phi is the Euler totient function (A000010).

Original entry on oeis.org

15, 91, 703, 1891, 8911, 12403, 38503, 79003, 88831, 146611, 188191, 218791, 269011, 286903, 385003, 497503, 597871, 736291, 765703, 954271, 1024651, 1056331, 1152271, 1314631, 1869211, 2741311, 3270403, 3913003, 4255903, 4686391, 5292631, 5481451, 6186403, 6969511
Offset: 1

Views

Author

Amiram Eldar, Nov 20 2019

Keywords

Comments

Odd numbers k such that A071294((k-1)/2) = A000010(k)/4.
For each odd composite number m > 9 the number of witnesses <= phi(m)/4. For numbers in this sequence the ratio reaches the maximal possible value 1/4.
The semiprime terms of this sequence are of the form (2*m+1)*(4*m+1) where 2*m+1 and 4*m+1 are primes and m is odd.

Examples

			15 is in the sequence since out of the phi(15) = 8 numbers 1 <= b < 15 that are coprime to 15, i.e., b = 1, 2, 4, 7, 8, 11, 13, and 14, 8/4 = 2 are witnesses for the strong pseudoprimality of 15: 1 and 14.
		

References

  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, 2nd ed., Springer, 2005, Theorem 3.5.4., p. 136.

Crossrefs

Programs

  • Mathematica
    o[n_] := (n - 1)/2^IntegerExponent[n - 1, 2];
    a[n_?PrimeQ] := n - 1; a[n_] := Module[{p = FactorInteger[n][[;; , 1]]}, om = Length[p]; Product[GCD[o[n], o[p[[k]]]], {k, 1, om}] * (1 + (2^(om * Min[IntegerExponent[#, 2] & /@ (p - 1)]) - 1)/(2^om - 1))];
    aQ[n_] := CompositeQ[n] && a[n] == EulerPhi[n]/4; s = Select[Range[3, 10^5, 2], aQ]
Showing 1-9 of 9 results.