# [seqfan] Sequences with Jacobi symbols in definitions

Tomasz Ordowski tomaszordowski at gmail.com
Mon Oct 23 18:51:19 CEST 2023

```... and the issue of their periodicity.

Dear number lovers!

Let a(n) be the smallest odd prime p such that n^{(p+1)/2} == n (mod p).
For n > 0 : 3, 7, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 13, 3, 3, 5, 3,
3, 7, ...
Note that a(n) is the smallest odd prime p for which (n / p) >= 0.
If this sequence is bounded, a(n) <= q, then it is periodic with
the period P = LCM(A) <= q#/2; see b(n) at the end.

Let A(n) be the smallest odd prime p such that n^{(p-1)/2} == 1 (mod p).
For n > 0 : 3, 7, 11, 3, 11, 5, 3, 7, 5, 3, 5, 11, 3, 5, 7, 3, 13, 7, 3,
11, 5, ...
A(n) is the smallest odd prime p for which (n / p) = 1.
This sequence is unbounded: A(p#/2) > p.
Of course A(n) >= a(n).

Let B(n) be the smallest odd k > 1 such that (n / k) = 1.
For n > 0 : 3, 7, 11, 3, 9, 5, 3, 7, 5, 3, 5, 11, 3, 5, 7, ...
I did not find this basic sequence in the OEIS.
This sequence is also unbounded.

Let b(n) be the smallest odd k > 1 such that n^{(k+1)/2} == n (mod k).
b(n) : 3, 7, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 7,
...
If b(n) = m, then (n / m) >= 0. It seems that b(n) <= A326614(n).
If this sequence is bounded, then it is periodic with the period
P = LCM(B), where B 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 (see third comment): https://oeis.org/A033181
Thus b(n) <= 1729 (perhaps much smaller).
So, as said, this sequence is periodic.
How long is this period?

Similarly, such a sequence, but of composite numbers,
(9, 341, 121, 341, 65, 15, 21, 9, 9, 9, 33, 33, 21, ...)
is bounded, but has a very very long period,
longer than the Euler primary pretenders;
A309316: https://oeis.org/A309316

Best,

Tom Ordo
___________
See A326614: https://oeis.org/A326614
Smallest Euler-Jacobi pseudoprime to base n.
__________
Cf. A354689: https://oeis.org/A354689
Smallest Euler pseudoprime to base n.
```