This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A349673 #21 Dec 14 2021 22:33:32 %S A349673 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, %T A349673 27,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81, %U A349673 81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81,81 %N 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. %C A349673 This is called the discriminator of f(x)=x^3+x. %C A349673 First differs from A064235 at n=244. %H A349673 Michel Marcus, <a href="/A349673/b349673.txt">Table of n, a(n) for n = 1..1000</a> %H A349673 Quan-Hui Yang and Lilu Zhao, <a href="https://arxiv.org/abs/2111.11227">On a discriminator for the polynomial f(x)=x^3+x</a>, arXiv:2111.11227 [math.NT], 2021. %F A349673 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). %t A349673 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 *) %o A349673 (PARI) isok(n,m) = my(v=vector(n, k, (k^3+k)% m)); #v == #vecsort(v,,8); %o A349673 a(n) = my(m=1); while (!isok(n, m), m++); m; %o A349673 (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)));} %Y A349673 Cf. A064235. %K A349673 nonn,easy %O A349673 1,2 %A A349673 _Michel Marcus_, Nov 24 2021