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.

A385681 a(n) is the least k > 1 such that n^2 == k (mod sopfr(k)) and k^2 == n (mod sopfr(n)), or -1 if there is no such k, where sopfr = A001414.

Original entry on oeis.org

2, 3, 2, 5, 4, 7, -1, 3, -1, 11, -1, 13, -1, -1, 4, 17, -1, 19, -1, 9, 120, 23, -1, 5, -1, 3, -1, 29, 30, 31, -1, -1, -1, -1, 4, 37, -1, -1, -1, 41, -1, 43, -1, 45, 36, 47, 2, 7, -1, -1, 16, 53, -1, -1, 2, -1, -1, 59, 30, 61, -1, -1, 2, -1, -1, 67, -1, 2745, 70, 71, 60, 73, -1, 150, -1, -1, -1
Offset: 2

Views

Author

Will Gosnell and Robert Israel, Aug 04 2025

Keywords

Comments

a(n) = -1 if n is in A385679. Conjecture: a(n) > 0 if n is not in A385679.
0 < a(n) < n if and only if n is in A385664.
If p is prime, then a(p) = p.

Examples

			a(6) = 4 because sopfr(6) = 5, sopfr(4) = 4, 6^2 == 4 == 0 (mod 4) and 4^2 == 6 == 1 (mod 5), and neither 2 nor 3 works.
		

Crossrefs

Programs

  • Maple
    sopfr:= proc(n) option remember; local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    f:= proc(x) local sx,R,y,X,r,k;
      sx:= sopfr(x);
      R:= sort(map(t -> rhs(op(t)), [msolve(X^2 = x,sx)]));
      if R = [] then return -1 fi;
      for k from 0 do
        for r in R do
          y:= r + k*sx;
          if y < 2 then next fi;
          if x^2 - y  mod sopfr(y) = 0 then return y fi
      od od;
    end proc:
    map(f, [$2 .. 100]);