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.

A301917 a(n) is the least k for which A301916(n) divides 3^k + 1.

This page as a plain text file.
%I A301917 #28 Feb 02 2023 10:07:02
%S A301917 1,2,3,8,9,14,15,9,4,21,26,5,11,6,39,44,24,50,17,56,63,68,69,74,25,39,
%T A301917 81,86,8,98,99,105,111,116,60,128,134,15,140,141,146,17,158,165,84,87,
%U A301917 176,61,93,189,194,99,200,102,73,224,114,230,231,243,83,254
%N A301917 a(n) is the least k for which A301916(n) divides 3^k + 1.
%C A301917 This can be used to factor P-1 values for potential primes, P of the form 3^k+2.
%C A301917 A301915 can be used in conjunction with this sequence such that A301916 always divides 3^(a(n) + k*A301915(n)) + 1 for all nonnegative values of k.
%H A301917 Robert Israel, <a href="/A301917/b301917.txt">Table of n, a(n) for n = 1..10000</a>
%F A301917 a(n) = A301919(n+1) - 1 for n > 1.
%e A301917 A301916(1) = 2 and the first value of k for which 3^k+1 is a multiple of 2 is k = 1, so a(1) = 1.
%e A301917 A301916(5) = 19 and the first value of k for which 3^k+1 is a multiple of 19 is k = 9, so a(5) = 9.
%p A301917 f:= proc(p) local t; t:= numtheory:-order(3,p); if t::even then t/2 else NULL fi end proc:
%p A301917 f(2):= 1:
%p A301917 map(f, [seq(ithprime(i),i=1..300)]); # _Robert Israel_, May 23 2018
%t A301917 f[p_] := Module[{t = MultiplicativeOrder[3, p]}, If[EvenQ[t],  t/2, Nothing]];
%t A301917 f[2] = 1;
%t A301917 f /@ Table[Prime[i], {i, 1, 300}] (* _Jean-François Alcover_, Feb 02 2023, after _Robert Israel_ *)
%o A301917 (PARI) lista(nn) = {for (n=1, nn, p = prime(n); if (p != 3, m = Mod(3, p); nb = znorder(m); for (k=1, nb, if (m^k == Mod(-1, p), print1(k, ", ")););););} \\ _Michel Marcus_, May 18 2018
%Y A301917 Cf. A301915, A301916, A301919.
%K A301917 nonn
%O A301917 1,2
%A A301917 _Luke W. Richards_, Mar 28 2018