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 A284148 #19 Mar 22 2017 21:55:08 %S A284148 3,0,1,0,3,28,45,276,595,1128,1953,3160,4851,264540,190333,254268, %T A284148 18915,3366496,32385,125391168,199588483,64620,174673821,5039370820, %U A284148 1784859363,16908230328,165025,34420237176,58409997075,1367074573228,2294838551853,15289788305820 %N A284148 Lexicographically earliest sequence of nonnegative integers such that a(1)=3 and the sequence is p-periodic mod p for any p > 0. %C A284148 The initial term a(1)=3 seems to be the least one that leads to a sequence that does not have a polynomial closed form. %C A284148 The first cycles mod p of this sequence are: %C A284148 p Cycle of a mod p %C A284148 - ---------------- %C A284148 1 0 %C A284148 2 1, 0 %C A284148 3 0, 0, 1 %C A284148 4 3, 0, 1, 0 %C A284148 5 3, 0, 1, 0, 3 %C A284148 6 3, 0, 1, 0, 3, 4 %C A284148 7 3, 0, 1, 0, 3, 0, 3 %C A284148 8 3, 0, 1, 0, 3, 4, 5, 4 %C A284148 9 3, 0, 1, 0, 3, 1, 0, 6, 1 %C A284148 For k>=0, let c_k denote the variant with initial term k. %C A284148 Naturaly, we have a=c_3. %C A284148 For some values of k, c_k has a polynomial closed form. %C A284148 The first such values to be known are: %C A284148 - k=0: c_0(n) = 0 = A000004(n), %C A284148 - k=1: c_1(n) = (n-2)^2 = A000290(n-2), %C A284148 - k=2: c_2(n) = (n-2)*(n-3) = A002378(n-3), %C A284148 - k=19: c_19(n) = (n-2)*(n^3 - 14*n^2 + 63*n - 88)/2, %C A284148 - k=20: c_20(n) = (n-2)*(n-3)*(n-5)*(n-6)/2, %C A284148 - k=22: c_22(n) = (n-2)*(n-3)*(n^2 - 11*n + 32)/2, %C A284148 - k=40: c_40(n) = (n-2)*(n-3)*(n-5)*(n-6), %C A284148 - k=172: c_172(n) = (n-2)*(n-3)*(n-5)*(n^3 - 23*n^2 + 172*n - 408)/12. %C A284148 We notice that c_40 = 2*c_20. %C A284148 As for A281409, this sequence is the first of a family (of sequences parametrized by their initial term) showing some kind of irregularity. %C A284148 For k>=0 and n>0, let d_n(k)=c_k(n): %C A284148 - In particular: d_1(k)=k, and a(n)=d_n(3), %C A284148 - For any n>1, d_n is periodic. %C A284148 The cycles for the first d_n (with n>1) are: %C A284148 n Cycle of d_n %C A284148 - ------------ %C A284148 2 0 %C A284148 3 0, 1 %C A284148 4 0, 4, 2 %C A284148 5 0, 9, 6, 3 %C A284148 6 0, 16, 12, 28, 24, 40, 36, 52, 48, 4 %C A284148 7 0, 25, 20, 45, 40, 5 %H A284148 Rémy Sigrist, <a href="/A284148/b284148.txt">Table of n, a(n) for n = 1..2000</a> %H A284148 Rémy Sigrist, <a href="/A284148/a284148.gp.txt">PARI program for A284148</a> %e A284148 By definition, a(1)=3. %e A284148 a(2) must equal 3 mod 1; a(2)=0 is suitable. %e A284148 a(3) must equal 3 mod 2 and 0 mod 1; a(3)=1 is suitable. %e A284148 a(4) must equal 3 mod 3 and 0 mod 2 and 1 mod 1; a(4)=0 is suitable. %e A284148 a(5) must equal 3 mod 4 and 0 mod 3 and 1 mod 2 and 0 mod 1; a(5)=3 is suitable. %Y A284148 Cf. A000004, A000290, A002378, A281409. %K A284148 nonn %O A284148 1,1 %A A284148 _Rémy Sigrist_, Mar 21 2017