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!)
A354139 a(n) is the least positive integer m such that (k+1)^n + (k+2)^n + ... + (k+m)^n == 0 (mod n) for every positive integer k. 1
1, 4, 3, 8, 5, 36, 7, 16, 3, 20, 11, 72, 13, 28, 15, 32, 17, 108, 19, 200, 21, 44, 23, 144, 5, 52, 3, 56, 29, 180, 31, 64, 33, 68, 35, 216, 37, 76, 39, 400, 41, 1764, 43, 88, 15, 92, 47, 288, 7, 20, 51, 104, 53, 324, 55, 112, 57, 116, 59, 1800, 61, 124, 21, 128, 65, 396, 67, 136, 69, 140, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) divides n * A007947(n).
LINKS
FORMULA
a(2^t) = 2^(t+1) for integers t>0.
a(n) = A007947(n) for odd integers n.
Conjecture: a(n) = A007947(n) * A193267(n).
EXAMPLE
a(2) = 4 because, for every positive integer k, (k+1)^2 + (k+2)^2 + (k+3)^2 + (k+4)^2 == 0 (mod 2), and no smaller positive integer satisfies this condition.
MATHEMATICA
sum[n_, r_] := Mod[Sum[k^r, {k, 1, n}], r];
rad[r_] := Product[i[[1]], {i, FactorInteger[r]}];
seq[r_] := Table[sum[n, r], {n, 1, r*rad[r]}];
A354139[r_] := Piecewise[ { {rad[r], OddQ[r]},
{2*r, EvenQ[r] && PrimePowerQ[r]},
{Length[FindRepeat[seq[r]]], EvenQ[r] && Not[PrimePowerQ[r]]}
}
];
Table[A354139[r], {r, 1, 20}] (* Improved by Dimitrios T. Tambakos, Feb 08 2023 *)
PROG
(PARI) isok(k, n) = my(p=sum(i=1, k, Mod(i+x, n)^n)); if (p==0, return(1)); for (i=1, n, if (subst(p, x, i) != 0, return(0))); return(1);
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, May 21 2022
CROSSREFS
Sequence in context: A082895 A086938 A007015 * A114562 A189042 A011451
KEYWORD
nonn
AUTHOR
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 May 10 07:40 EDT 2024. Contains 372358 sequences. (Running on oeis4.)