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.

A333339 a(n) is the smallest positive number k such that n divides 3^k - k.

This page as a plain text file.
%I A333339 #15 Mar 19 2020 11:21:38
%S A333339 1,1,3,3,7,3,2,3,9,7,4,3,16,5,27,11,5,9,29,7,27,45,39,3,73,27,27,27,
%T A333339 22,27,132,27,36,5,27,27,65,29,27,27,27,27,10,59,27,39,12,27,47,73,42,
%U A333339 27,68,27,36,27,30,47,154,27,192,147,27,59,16,45,119,75,39
%N A333339 a(n) is the smallest positive number k such that n divides 3^k - k.
%C A333339 For any positive integer n, if k = a(n) + n*m*A007734(n) and m >= 0 then 3^k - k is divisible by n.
%C A333339 a(n) > log_3(n). - _Robert Israel_, Mar 19 2020
%H A333339 Robert Israel, <a href="/A333339/b333339.txt">Table of n, a(n) for n = 1..10000</a>
%F A333339 a(3^m) = 3^m for m >= 0.
%F A333339 a(3^m-m) = m for m >= 1. - _Robert Israel_, Mar 19 2020
%p A333339 f:= proc(n) local k;
%p A333339   for k from 1 do if 3 &^k - k mod n = 0 then return k fi od
%p A333339 end proc:
%p A333339 map(f, [$1..100]); # _Robert Israel_, Mar 19 2020
%t A333339 a[n_] := Module[{k = 1}, While[!Divisible[3^k - k, n], k++]; k]; Array[a, 100] (* _Amiram Eldar_, Mar 16 2020 *)
%o A333339 (PARI) a(n) = for(k=1, oo, if(Mod(3, n)^k==k, return(k)));
%Y A333339 Cf. A007734, A072872, A333334.
%K A333339 nonn
%O A333339 1,3
%A A333339 _Jinyuan Wang_, Mar 16 2020