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

A366502 Let q = A246655(n) for n >= 2, then a(n) = (q - Kronecker(-4,q))/4 - 1.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10, 11, 11, 12, 14, 14, 15, 16, 17, 17, 19, 19, 20, 21, 23, 24, 25, 26, 26, 27, 29, 30, 31, 31, 32, 33, 34, 36, 37, 38, 40, 41, 41, 42, 44, 44, 47, 47, 48, 49, 52
Offset: 2

Views

Author

Jianing Song, Oct 12 2023

Keywords

Comments

If q is not a power of 2, then a(n) is the number of pairs of consecutive nonzero squares in the finite field F_q. In other words, a(n) is the number of solutions to x^((q-1)/2) = (x+1)^((q-1)/2) = 1 in F_q. This can be proved by generalizing the argument of Jack D'Aurizio to the Math Stack Exchange question "Existence of Consecutive Quadratic residues" to the case of F_q.

Examples

			a(5) = 1 because there is one pair of consecutive nonzero squares in the finite field F_q with q = A246655(5) = 7, namely {1, 2}.
a(7) = 1 because there is one pair of consecutive nonzero squares in the finite field F_q with q = A246655(7) = 9, namely {1, 2} (note that 2 = -1 = i^2 in F_9 = F_3(i)).
		

Crossrefs

Cf. A246655, A101455 ({kronecker(-4,n)}), A024698.
A015518(n)-1 and A003463(n)-1 are respectively the number of consecutive nonzero squares in F_{3^n} and in F_{5^n}.

Programs

  • PARI
    lim_A366502(N) = for(n=3, N, if(isprimepower(n), print1((n - kronecker(-4,n))/4 - 1, ", ")))
    
  • Python
    from sympy import primepi, integer_nthroot, kronecker_symbol
    def A366502(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return ((m:=bisection(f,n,n))-kronecker_symbol(-4,m)>>2)-1 # Chai Wah Wu, Jan 19 2025

A290636 The arithmetic function v_3(n,4).

Original entry on oeis.org

1, 0, 2, 1, 3, 2, 4, 2, 5, 3, 6, 3, 7, 3, 8, 4, 9, 5, 10, 6, 11, 6, 12, 6, 13, 6, 14, 7, 15, 8, 16, 9, 17, 10, 18, 9, 19, 9, 20, 10, 21, 11, 22, 11, 23, 12, 24, 14, 25, 12, 26, 13, 27, 15, 28, 15, 29, 15, 30, 15, 31, 18, 32, 16, 33, 17, 34, 18, 35
Offset: 2

Views

Author

Robert Price, Aug 13 2017

Keywords

References

  • J. Butterworth, Examining the arithmetic function v_g(n,h). Research Papers in Mathematics, B. Bajnok, ed., Gettysburg College, Vol. 8 (2008).

Crossrefs

Cf. A211316 (equals v_1(n,3)).
Cf. A024698.

Programs

  • Maple
    f:= n -> max(map(t -> (floor((t - 1 - igcd(t, 3))/4) + 1)*n/t, numtheory:-divisors(n))):
    map(f, [$2..100]); # Robert Israel, Aug 16 2017
  • Mathematica
    v[g_, n_, h_] := (d = Divisors[n]; Max[(Floor[(d - 1 - GCD[d, g])/h] + 1)*n/d]); Table[v[3, n, 4], {n, 2, 70}]

Formula

For n >= 3, f(prime(n)) = A024698(n-1). - Robert Israel, Aug 16 2017
Showing 1-2 of 2 results.