login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A298827 a(n) is the smallest positive integer k such that 3^n+2 divides 3^(n+k)+2. 2
4, 5, 28, 41, 84, 336, 990, 193, 1260, 5905, 75918, 10065, 318860, 2391485, 14348908, 20390382, 5031420, 31624326, 5985168, 1743333144, 8569036, 668070480, 547062516, 141214768241, 167874004756, 1270932914165, 385131186110, 2837770056420, 784347169884, 475536631360, 149093578413164, 139370386996590 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
3^n+2 divides 3^(n+a(n)*m)+2 for all nonnegative integers m.
Jon E. Schoenfield noted that a(n) coincides with the multiplicative order of 3 modulo 3^n+2. This is true because 3^(n+a(n)) == 3^n mod 3^n+2 and since 3^n and 3^n+2 are coprime, 3^a(n) == 1 mod 3^n+2 and the multiplicative order is the smallest positive such number. - Chai Wah Wu, Jan 29 2018
LINKS
EXAMPLE
For n = 1, f(1) = 3^1 + 2 = 5, where f(x) = 3^x + 2. Given the last digits of f(x) form a recurring sequence of 5, 1, 9, 3 [, 5, 1, 9, 3] then whenever x = 1 mod 4, f(x) will be a multiple of f(1).
For n = 2, f(2) = 3^2 + 2 = 11. a(2) = 5. So any x = 2 mod 5 will be a multiple of 11. For instance, 27 = 2 mod 5, and f(27) = 3^27 + 2 = 7625597474989 = 11 * 693236134999.
MAPLE
seq(numtheory:-order(3, 3^n+2), n=1..100); # Robert Israel, Feb 05 2018
MATHEMATICA
Array[Block[{k = 1}, While[! Divisible[3^(# + k) + 2, 3^# + 2], k++]; k] &, 12] (* Michael De Vlieger, Feb 05 2018 *)
Table[MultiplicativeOrder[3, 3^n + 2], {n, 32}] (* Jean-François Alcover, Feb 06 2018 *)
PROG
(Python)
def fmod(n, mod):
....return (pow(3, n, mod) + 2) % mod
def f(n):
....return pow(3, n) + 2
#terms is the number of terms to generate
terms = 20
for x in range(1, terms + 1):
....div = f(x)
....y = x + 1
....while fmod(y, div) != 0:
........y += 1
....print(y - x)
(Python)
from sympy import n_order
def A298827(n):
return n_order(3, 3**n+2) # Chai Wah Wu, Jan 29 2018
(Magma) [Modorder(3, 3^n+2): n in [1..29]]; // Jon E. Schoenfield, Jan 28 2018
(PARI) a(n) = znorder(Mod(3, 3^n+2)); \\ Michel Marcus, Jan 29 2018
CROSSREFS
Cf. A168607.
Sequence in context: A270217 A270274 A271602 * A092659 A002352 A042647
KEYWORD
nonn
AUTHOR
Luke W. Richards, Jan 27 2018
EXTENSIONS
a(22)-a(32) from Robert Israel, Feb 05 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)