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

A337878 a(n) is the smallest m > 0 such that the n-th prime divides Jacobsthal(m).

Original entry on oeis.org

3, 4, 6, 5, 12, 8, 9, 22, 28, 10, 36, 20, 7, 46, 52, 29, 60, 33, 70, 18, 78, 41, 22, 48, 100, 102, 53, 36, 28, 14, 65, 68, 69, 148, 30, 52, 81, 166, 172, 89, 180, 190, 96, 196, 198, 105, 74, 113, 76, 58, 238, 24, 25, 16, 262, 268, 270, 92, 35, 47, 292, 51
Offset: 2

Views

Author

A.H.M. Smeets, Sep 27 2020

Keywords

Comments

All positive Jacobsthal numbers are odd, so the index starts at n = 2.
The set of primitive prime factors of J_k is given by {A000040(j) | a(j) = k}.
By definition, a(n) is the multiplicative order of -2 modulo the n-th prime for n > 2. - Jianing Song, Jun 20 2025

Examples

			The 4th prime number is 7, and 7 divides 21 which is Jacobsthal(6), so a(4) = 6. The second prime number, 3, divides Jacobsthal(6) as well, but it divides also the smaller Jacobsthal(3), i.e., a(2) = 3.
		

Crossrefs

Cf. A000040 (primes), A001045 (Jacobsthal numbers), A001602 (similar for Fibonacci numbers), A105874 (primes having primitive root -2), A129738.
Cf. multiplicative orders of 2..10: A014664, A062117, A082654, A211241, A211242, A211243, A211244, A211245, A002371.
Cf. multiplicative orders of -2..-10: this sequence (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    m = 300; j = LinearRecurrence[{1, 2}, {3, 5}, m]; s = {}; p = 3; While[(ind = Select[Range[m], Divisible[j[[#]], p] &, 1]) != {}, AppendTo[s, ind[[1]] + 2]; p = NextPrime[p]]; s (* Amiram Eldar, Sep 28 2020 *)
  • PARI
    J(n) = (2^n - (-1)^n)/3; \\ A001045
    a(n) = {my(k=1, p=prime(n)); while (J(k) % p, k++); k;} \\ Michel Marcus, Sep 29 2020
  • Python
    n = 1
    while n < 63:
        n, J0, J1, a = n+1, 3, 1, 3
        p = A000040(n)
        J0 = J0%p
        while J0 != 0:
            J0, J1, a = (J0+2*J1)%p, J0, a+1
        print(n,a)
    

Formula

A000040(n) == 1 (mod a(n)) for n > 2.

A380482 a(n) is the multiplicative order of -3 modulo prime(n); a(2) = 0 for completion.

Original entry on oeis.org

1, 0, 4, 3, 10, 6, 16, 9, 22, 28, 15, 9, 8, 21, 46, 52, 58, 5, 11, 70, 12, 39, 82, 88, 48, 100, 17, 106, 54, 112, 63, 130, 136, 69, 148, 25, 39, 81, 166, 172, 178, 90, 190, 16, 196, 99, 105, 111, 226, 114, 232, 238, 120, 250, 256, 262, 268, 15, 138, 280
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105875 (primes having primitive root -3).
Cf. bases -2..-10: A337878 (if first term 1), this sequence, A380531, A380532, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380482[n_] := If[n == 2, 0, MultiplicativeOrder[-3, Prime[n]]];
    Array[A380482, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-3}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380531 a(n) is the multiplicative order of -4 modulo prime(n); a(1) = 0 for completion.

Original entry on oeis.org

0, 2, 1, 6, 10, 3, 4, 18, 22, 7, 10, 9, 5, 14, 46, 13, 58, 15, 66, 70, 18, 78, 82, 22, 24, 25, 102, 106, 9, 7, 14, 130, 17, 138, 37, 30, 13, 162, 166, 43, 178, 45, 190, 48, 49, 198, 210, 74, 226, 19, 58, 238, 12, 50, 8, 262, 67, 270, 23, 70
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Comments

a(n) divides (p-1)/4 if p = prime(n) == 1 (mod 4), since (-4)^((p-1)/4) == (+-1+-i)^(p-1) == 1 (mod p), where i^2 == -1 (mod p).

Crossrefs

Cf. A105876 (primes having primitive root -4).
Cf. bases -2..-10: A337878 (if first term 1), A380482, this sequence, A380532, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380531[n_] := If[n == 1, 0, MultiplicativeOrder[-4, Prime[n]]];
    Array[A380531, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-4}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380532 a(n) is the multiplicative order of -5 modulo prime(n); a(3) = 0 for completion.

Original entry on oeis.org

1, 1, 0, 3, 10, 4, 16, 18, 11, 7, 6, 36, 20, 21, 23, 52, 58, 15, 11, 10, 72, 78, 41, 44, 96, 50, 51, 53, 54, 112, 21, 130, 136, 138, 74, 150, 156, 27, 83, 172, 178, 30, 38, 192, 196, 66, 70, 111, 113, 57, 232, 238, 40, 50, 256, 131, 134, 54, 276, 140
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105877 (primes having primitive root -5).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, this sequence, A380533, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380532[n_] := If[n == 3, 0, MultiplicativeOrder[-5, Prime[n]]];
    Array[A380532, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-5}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380533 a(n) is the multiplicative order of -6 modulo prime(n); a(1) = a(2) = 0 for completion.

Original entry on oeis.org

0, 0, 2, 1, 5, 12, 16, 18, 22, 7, 3, 4, 40, 6, 46, 13, 29, 60, 66, 70, 36, 39, 41, 88, 12, 5, 51, 53, 108, 112, 63, 65, 136, 46, 74, 75, 156, 54, 166, 86, 89, 60, 38, 96, 7, 99, 210, 111, 113, 228, 232, 34, 20, 125, 256, 262, 67, 135, 276, 56
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105878 (primes having primitive root -6).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, this sequence, A380540, A380541, A380542, A385222.

Programs

  • Mathematica
    A380533[n_] := If[n < 3, 0, MultiplicativeOrder[-6, Prime[n]]];
    Array[A380533, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-6}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380540 a(n) is the multiplicative order of -7 modulo prime(n); a(4) = 0 for completion.

Original entry on oeis.org

1, 2, 4, 0, 5, 12, 16, 6, 11, 14, 30, 18, 40, 3, 46, 13, 58, 60, 33, 35, 24, 39, 82, 88, 96, 100, 102, 53, 54, 7, 63, 130, 68, 138, 37, 75, 52, 81, 166, 172, 89, 12, 5, 24, 49, 198, 105, 74, 226, 228, 116, 119, 240, 250, 256, 131, 268, 270, 69, 20
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105879 (primes having primitive root -7).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, this sequence, A380541, A380542, A385222.

Programs

  • Mathematica
    A380540[n_] := If[n == 4, 0, MultiplicativeOrder[-7, Prime[n]]];
    Array[A380540, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-7}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

A380541 a(n) is the multiplicative order of -8 modulo prime(n); a(1) = 0 for completion.

Original entry on oeis.org

0, 1, 4, 2, 5, 4, 8, 3, 22, 28, 10, 12, 20, 7, 46, 52, 29, 20, 11, 70, 6, 26, 41, 22, 16, 100, 34, 53, 12, 28, 14, 65, 68, 23, 148, 10, 52, 27, 166, 172, 89, 60, 190, 32, 196, 66, 35, 74, 113, 76, 58, 238, 8, 25, 16, 262, 268, 90, 92, 35
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A105880 (primes having primitive root -8).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, this sequence, A380542, A385222.

Programs

  • Mathematica
    A380541[n_] := If[n == 1, 0, MultiplicativeOrder[-8, Prime[n]]];
    Array[A380541, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-8}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))

Formula

a(n) = ord(-2,p)/gcd(ord(-2,p),3) for p != 2, where p = prime(n), and ord(a,m) is the multiplicative order of a modulo m. Note that ord(-2,p) = A337878(n) for n > 2.

A385222 a(n) is the multiplicative order of -10 modulo prime(n); a(1) = a(3) = 0 for completion.

Original entry on oeis.org

0, 2, 0, 3, 1, 3, 16, 9, 11, 28, 30, 6, 10, 42, 23, 26, 29, 60, 66, 70, 8, 26, 82, 44, 96, 4, 17, 106, 108, 112, 21, 65, 8, 23, 148, 150, 39, 162, 83, 86, 89, 180, 190, 192, 49, 198, 15, 111, 226, 228, 232, 14, 15, 25, 256, 131, 268, 10, 138, 28
Offset: 1

Views

Author

Jianing Song, Jun 27 2025

Keywords

Crossrefs

Cf. A007348 (primes having primitive root -10).
Cf. bases -2..-10: A337878 (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, A380542, this sequence.

Programs

  • Mathematica
    A385222[n_] := If[n == 1 || n == 3, 0, MultiplicativeOrder[-10, Prime[n]]];
    Array[A385222, 100] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    a(n,{k=-10}) = my(p = prime(n)); if(k%p==0, 0, znorder(Mod(k,p)))
Showing 1-8 of 8 results.