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.

A309285 a(n) is the smallest odd composite k such that prime(n)^((k-1)/2) == 1 (mod k) and q^((k-1)/2) == -1 (mod k) for every prime q < prime(n).

Original entry on oeis.org

341, 29341, 48354810571, 493813961816587, 32398013051587
Offset: 1

Views

Author

Thomas Ordowski, Jul 21 2019

Keywords

Comments

a(n) is an Euler pseudoprime to base 2, so it is also a Fermat pseudoprime to base 2.
This sequence is analogous to the sequence A307965 of primes.
Conjecture: the smallest prime quadratic residue modulo a(n) is prime(n).
a(6) <= 35141256146761030267, a(7) <= 4951782572086917319747. - Daniel Suteu, Jul 22 2019

Crossrefs

Programs

  • PARI
    isok(n,k) = (k%2==1) && !isprime(k) && Mod(prime(n), k)^((k-1)/2) == Mod(1, k) && !forprime(q=2, prime(n)-1, if(Mod(q, k)^((k-1)/2) != Mod(-1, k), return(0)));
    a(n) = for(k=9, oo, if(isok(n, k), return(k))); \\ Daniel Suteu, Jul 22 2019

Formula

According to the data, for n > 1, q^((a(n)-1)/2) == (q / a(n)) (mod a(n)) for every prime q <= prime(n), where (x / y) is the Jacobi symbol.

Extensions

a(4)-a(5) from Amiram Eldar, Jul 21 2019

A351921 a(n) is the smallest nonzero number k such that gcd(prime(1)^k + 1, prime(2)^k + 1, ..., prime(n)^k + 1) > 1 and gcd(prime(1)^k + 1, prime(2)^k + 1, ..., prime(n+1)^k + 1) = 1.

Original entry on oeis.org

2, 26, 21, 86, 33, 1238, 4401, 4586, 16161, 18561, 81, 37046, 85478, 180146, 339866
Offset: 2

Views

Author

Gleb Ivanov, Feb 25 2022

Keywords

Comments

Apparently, a(n) = (A307965(n+1) + 1)/2 - 1 for n>=3. - Hugo Pfoertner, Mar 02 2022

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1, p = Prime[Range[n + 1]]}, While[GCD @@ (Most[p]^k + 1) == 1 || GCD @@ (p^k + 1) > 1, k++]; k]; Array[a, 10, 2] (* Amiram Eldar, Feb 26 2022 *)
  • PARI
    isok(k, n) = my(v = vector(n+1, i, prime(i)^k+1)); (gcd(v) == 1) && (gcd(Vec(v, n)) != 1);
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Mar 18 2022
  • Python
    from sympy import sieve
    from math import gcd
    from functools import reduce
    sieve.extend_to_no(50)
    pr = list(sieve._list)
    terms = [0]*100
    for i in range(2, 85478+1):
        k,g,len_f = 1,2,0
        while g != 1:
            k += 1
            len_f += 1
            g = reduce(gcd, [t**i + 1 for t in pr[:k]])
        if len_f > 1 and terms[len_f] == 0:
            terms[len_f] = i
    print(terms[2:15])
    

Extensions

a(15)-a(16) from Jon E. Schoenfield, Mar 01 2022
Showing 1-2 of 2 results.