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!)
A349673 a(n) is the smallest positive integer m such that the set of numbers {f(k) : 1 <= k <= n} are pairwise distinct modulo m for f(x)=x^3+x. 1
1, 3, 3, 9, 9, 9, 9, 9, 9, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This is called the discriminator of f(x)=x^3+x.
First differs from A064235 at n=244.
LINKS
Quan-Hui Yang and Lilu Zhao, On a discriminator for the polynomial f(x)=x^3+x, arXiv:2111.11227 [math.NT], 2021.
FORMULA
a(n) = 7*3^(6s+4) if n=3^(6s+5)+1 or n=3^(6s+5)+2; otherwise a(n) = 3^ceiling(log_3(n)) (see Theorem 1.1 in Yang & Zhao).
MATHEMATICA
a[n_] := Module[{e1 = IntegerExponent[n-1, 3], e2 = IntegerExponent[n-2, 3], e = -1}, If[3^e1 == n - 1 && Mod[e1, 6] == 5, e = e1 - 1]; If[3^e2 == n-2 && Mod[e2, 6] == 5, e = e2 - 1]; If[e > -1, 7*3^e, 3^Ceiling[Log[3, n]]]]; Array[a, 100] (* Amiram Eldar, Nov 24 2021 *)
PROG
(PARI) isok(n, m) = my(v=vector(n, k, (k^3+k)% m)); #v == #vecsort(v, , 8);
a(n) = my(m=1); while (!isok(n, m), m++); m;
(PARI) a(n) = {my(v); if ((n%3 == 1) && (n!=1), v=valuation(n-1, 3); if ((3^v == n-1) && ((v%6)==5), return(7*3^(v-1)))); if ((n%3 == 2) && (n!=2), v=valuation(n-2, 3); if ((3^v == n-2) && ((v%6)==5), return(7*3^(v-1)))); return(3^ceil(log(n)/log(3))); }
CROSSREFS
Cf. A064235.
Sequence in context: A201456 A347033 A336992 * A064235 A098355 A183429
KEYWORD
nonn,easy
AUTHOR
Michel Marcus, Nov 24 2021
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 18 15:33 EDT 2024. Contains 371780 sequences. (Running on oeis4.)