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.

A119678 a(n) is the least k such that 4^k mod k = n.

This page as a plain text file.
%I A119678 #28 Mar 14 2021 12:08:05
%S A119678 3,14,137243,5,6821,10,57,124,35,18,2791496231,244,51,505,199534799,
%T A119678 20,30271293169,49,45,236,399531841,42,533,25,39,50,352957,36,995,98,
%U A119678 33,112,47503,55,42345881,44,2981,289,805,78,1019971289,25498,2121,212
%N A119678 a(n) is the least k such that 4^k mod k = n.
%C A119678 a(n) > n.
%C A119678 Numbers n > 1 such that a(n-1) = n are listed in A015950.
%C A119678 a(87) > 10^14.
%C A119678 a(11) <= 2791496231, a(17) <= 140631956671, a(53) <= 52134328061 from Joe K. Crump (joecr(AT)carolina.rr.com), Feb 10 2007
%H A119678 Ryan Propper, <a href="/A119678/b119678.txt">Table of n, a(n) for n = 1..82</a>
%H A119678 Robert G. Wilson v, <a href="/A119678/a119678.txt">Table of n, a(n) for n = 1..10000 with -1 for those entries where a(n) has not yet been found</a>
%F A119678 a(5^k-1) = 5^k.
%t A119678 Do[k = 1; While[PowerMod[4, k, k] != n, k++ ]; Print[k], {n, 30}]
%t A119678 t = Table[0, {10000} ]; k = 1; While[ k < 5000000000, a = PowerMod[4, k, k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t (* search limits expanded by _Robert G. Wilson v_, Jul 14 2009 *)
%o A119678 (Python)
%o A119678 def a(n):
%o A119678   k = 1
%o A119678   while 4**k % k != n: k += 1
%o A119678   return k
%o A119678 print([a(n) for n in range(1, 11)]) # _Michael S. Branicky_, Mar 14 2021
%Y A119678 Cf. A015950, A036236, A078457, A119679, A127816, A119715, A119714, A127817, A127818, A127819, A127820, A127821.
%K A119678 nonn
%O A119678 1,1
%A A119678 _Ryan Propper_, Jun 12 2006
%E A119678 a(11) = 2791496231 from _Robert G. Wilson v_, Feb 11 2007; confirmed by _Ryan Propper_, Feb 15 2007
%E A119678 Link corrected by _R. J. Mathar_, Jul 24 2009
%E A119678 a(83) = 3085807457009 = 113 * 331 * 82501603 from _Hagen von Eitzen_, Jul 27 2009