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.

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

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).

A373666 Smallest positive integer whose square can be written as the sum of n positive perfect squares whose square roots differ by no more than 1.

Original entry on oeis.org

1, 5, 3, 2, 5, 3, 4, 10, 3, 4, 7, 6, 4, 9, 6, 4, 25, 6, 5, 10, 6, 5, 16, 6, 5, 12, 6, 7, 11, 6, 7, 20, 6, 7, 15, 6, 7, 31, 9, 7, 13, 9, 7, 14, 9, 7, 36, 9, 7, 15, 9, 8, 22, 9, 8, 17, 9, 8, 16, 9, 8, 49, 9, 8, 20, 9, 10, 50, 9, 10, 17, 9, 10, 19, 9, 10, 28, 9
Offset: 1

Views

Author

Charles L. Hohn, Jun 12 2024

Keywords

Comments

Shortest possible integer length of the diagonal of an n-dimensional hyperrectangle where each edge has a positive integer length, and edge lengths differ by no more than 1.

Examples

			a(1) = 1 because 1^2 = 1^2.
a(2) = 5 because 5^2 = 3^2 + 4^2.
a(3) = 3 because 3^2 = 1^2 + 2*(2^2).
a(4) = 2 because 2^2 = 4*(1^2).
a(5) = 5 because 5^2 = 4*(2^2) + 3^2.
a(6) = 3 because 3^2 = 5*(1^2) + 2^2.
a(7) = 4 because 4^2 = 4*(1^2) + 3*(2^2).
		

Crossrefs

Programs

  • PARI
    a(n) = my(d=ceil(sqrt(n))); while(true, my(b=sqrtint(floor(d^2/n))); if ((d^2-b^2*n)%(b*2+1)==0, return(d), d++)) \\ Charles L. Hohn, Jul 02 2024
    
  • PARI
    a366973(n) = {for(i=2, oo, my(p=prime(i)); for(j=0, (p-1)/2, if(n%p==j^2%p, return(p))))}
    bstep(np, p) = {my(t=np+if(np%2, p)); while(!issquare(t), t+=p*2); sqrtint(t)/2}
    a(n) = my(p=a366973(n), b=sqrtint(n*((p-1)/2)^2-1)+1, bp=b%p, s=bstep(n%p, p)); b-bp+if(bp<=s, s, bp<=p-s, p-s, p+s) \\ Charles L. Hohn, Sep 27 2024

Formula

a(n) = min(d) such that d^2 - n*b^2 == 0 (mod 2*b + 1) and d >= ceiling(sqrt(n)) where b = floor(sqrt(d^2/n)).

A367034 a(n) is the smallest odd number k > 1 for which the Jacobi symbol (n / k) >= 0.

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, 9, 3, 3, 5, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 9, 3, 3, 5, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 7, 3, 3, 5, 3, 3, 5
Offset: 0

Views

Author

Amiram Eldar and Thomas Ordowski, Nov 02 2023

Keywords

Comments

This sequence is periodic with period P = 3*5*7 = 105.
All terms are in {3, 5, 7, 9}.

Crossrefs

Cf. A366973.

Programs

  • Mathematica
    a[n_] := Module[{k = 3}, While[JacobiSymbol[n, k] < 0, k += 2]; k]; Array[a, 105, 0]
  • PARI
    a(n) = my(k=3); while(kronecker(n,k)<0, k+=2); k; \\ Michel Marcus, Nov 02 2023

Formula

a(n + 105) = a(n).
Showing 1-4 of 4 results.