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!)
A316505 a(n) is the smallest number k > 1 such that k^n - 1 is divisible by 3^n. 0
4, 8, 10, 80, 244, 242, 2188, 6560, 2188, 59048, 177148, 177146, 1594324, 4782968, 4782970, 43046720, 129140164, 43046720, 1162261468, 3486784400, 3486784402, 31381059608, 94143178828, 94143178826, 847288609444, 2541865828328, 282429536482, 22876792454960, 68630377364884, 68630377364882, 617673396283948 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
To find such k, let n = 3^t*s, gcd(3,s) = 1. By Euler's totient theorem, k^n - 1 is divisible by 3^n is equivalent to k^s - 1 is divisible by 3^(3^t*s - t). For odd s, the solutions for k are k == 1 (mod 3^(3^t*s - t)); for even s, the solutions are k == +-1 (mod 3^(3^t*s - t)). This gives the formula below in formula section.
LINKS
FORMULA
a(n) = 3^(n - A007949(n)) - (-1)^n.
EXAMPLE
For n = 3, k^3 == 1 (mod 27) implies k == 1 (mod 9), so a(3) = 10.
For n = 4, k^4 == 1 (mod 81) implies k == +-1 (mod 81), so a(4) = 80.
MATHEMATICA
Array[3^(# - IntegerExponent[#, 3]) - (-1)^# &, 31] (* Michael De Vlieger, Jul 05 2018 *)
PROG
(PARI) v(n) = valuation(n, 3);
a(n) = 3^(n - v(n)) - (-1)^n;
CROSSREFS
Cf. A088032 (conjectured to be the smallest number k > 1 such that k^n - 1 is divisible by 2^n).
Sequence in context: A037004 A136861 A109445 * A293597 A131803 A133270
KEYWORD
nonn
AUTHOR
Jianing Song, Jul 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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)