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.
%I A337878 #54 Jul 07 2025 10:43:38 %S A337878 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, %T A337878 102,53,36,28,14,65,68,69,148,30,52,81,166,172,89,180,190,96,196,198, %U A337878 105,74,113,76,58,238,24,25,16,262,268,270,92,35,47,292,51 %N A337878 a(n) is the smallest m > 0 such that the n-th prime divides Jacobsthal(m). %C A337878 All positive Jacobsthal numbers are odd, so the index starts at n = 2. %C A337878 The set of primitive prime factors of J_k is given by {A000040(j) | a(j) = k}. %C A337878 By definition, a(n) is the multiplicative order of -2 modulo the n-th prime for n > 2. - _Jianing Song_, Jun 20 2025 %H A337878 Jianing Song, <a href="/A337878/b337878.txt">Table of n, a(n) for n = 2..10000</a> %H A337878 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimitivePrimeFactor.html">Primitive Prime Factor</a> %F A337878 A000040(n) == 1 (mod a(n)) for n > 2. %e A337878 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. %t A337878 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 *) %o A337878 (Python) %o A337878 n = 1 %o A337878 while n < 63: %o A337878 n, J0, J1, a = n+1, 3, 1, 3 %o A337878 p = A000040(n) %o A337878 J0 = J0%p %o A337878 while J0 != 0: %o A337878 J0, J1, a = (J0+2*J1)%p, J0, a+1 %o A337878 print(n,a) %o A337878 (PARI) J(n) = (2^n - (-1)^n)/3; \\ A001045 %o A337878 a(n) = {my(k=1, p=prime(n)); while (J(k) % p, k++); k;} \\ _Michel Marcus_, Sep 29 2020 %Y A337878 Cf. A000040 (primes), A001045 (Jacobsthal numbers), A001602 (similar for Fibonacci numbers), A105874 (primes having primitive root -2), A129738. %Y A337878 Cf. multiplicative orders of 2..10: A014664, A062117, A082654, A211241, A211242, A211243, A211244, A211245, A002371. %Y A337878 Cf. multiplicative orders of -2..-10: this sequence (if first term 1), A380482, A380531, A380532, A380533, A380540, A380541, A380542, A385222. %K A337878 nonn %O A337878 2,1 %A A337878 _A.H.M. Smeets_, Sep 27 2020