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!)
A282779 Period of cubes mod n. 1
1, 2, 3, 4, 5, 6, 7, 8, 3, 10, 11, 12, 13, 14, 15, 16, 17, 6, 19, 20, 21, 22, 23, 24, 25, 26, 9, 28, 29, 30, 31, 32, 33, 34, 35, 12, 37, 38, 39, 40, 41, 42, 43, 44, 15, 46, 47, 48, 49, 50, 51, 52, 53, 18, 55, 56, 57, 58, 59, 60, 61, 62, 21, 64, 65, 66, 67, 68, 69, 70, 71, 24, 73, 74, 75, 76, 77, 78, 79, 80, 27 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The length of the period of A000035 (n=2), A010872 (n=3), A109718 (n=4), A070471 (n=5), A010875 (n=6), A070472 (n=7), A109753 (n=8), A167176 (n=9), A008960 (n = 10), etc. (see also comment in A000578 from R. J. Mathar).
Conjecture: let a_p(n) be the length of the period of the sequence k^p mod n where p is a prime, then a_p(n) = n/p if n == 0 (mod p^2) else a_p(n) = n.
For example: sequence k^7 mod 98 gives 1, 30, 31, 18, 19, 48, 49, 50, 79, 80, 67, 68, 97, 0, 1, 30, 31, 18, 19, 48, 49, 50, 79, 80, 67, 68, 97, 0, ... (period 14), 7 is a prime, 98 == 0 (mod 7^2) and 98/7 = 14.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -1).
FORMULA
Apparently: a(n) = 2*a(n-9) - a(n-18).
Empirical g.f.: x*(1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4 + 6*x^5 + 7*x^6 + 8*x^7 + 3*x^8 + 8*x^9 + 7*x^10 + 6*x^11 + 5*x^12 + 4*x^13 + 3*x^14 + 2*x^15 + x^16) / ((1 - x)^2*(1 + x + x^2)^2*(1 + x^3 + x^6)^2). - Colin Barker, Feb 21 2017
EXAMPLE
a(9) = 3 because reading 1, 8, 27, 64, 125, 216, 343, 512, ... modulo 9 gives 1, 8, 0, 1, 8, 0, 1, 8, 0, ... with period length 3.
MATHEMATICA
a[1] = 1; a[n_] := For[k = 1, True, k++, If[Mod[k^3, n] == 0 && Mod[(k + 1)^3 , n] == 1, Return[k]]]; Table[a[n], {n, 1, 81}]
CROSSREFS
Sequence in context: A278060 A160597 A327389 * A327535 A305902 A245350
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Feb 21 2017
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 July 11 20:49 EDT 2024. Contains 374234 sequences. (Running on oeis4.)