login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Lexicographically earliest sequence of nonnegative integers such that a(1)=3 and the sequence is p-periodic mod p for any p > 0.
1

%I #19 Mar 22 2017 21:55:08

%S 3,0,1,0,3,28,45,276,595,1128,1953,3160,4851,264540,190333,254268,

%T 18915,3366496,32385,125391168,199588483,64620,174673821,5039370820,

%U 1784859363,16908230328,165025,34420237176,58409997075,1367074573228,2294838551853,15289788305820

%N Lexicographically earliest sequence of nonnegative integers such that a(1)=3 and the sequence is p-periodic mod p for any p > 0.

%C 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 The first cycles mod p of this sequence are:

%C p Cycle of a mod p

%C - ----------------

%C 1 0

%C 2 1, 0

%C 3 0, 0, 1

%C 4 3, 0, 1, 0

%C 5 3, 0, 1, 0, 3

%C 6 3, 0, 1, 0, 3, 4

%C 7 3, 0, 1, 0, 3, 0, 3

%C 8 3, 0, 1, 0, 3, 4, 5, 4

%C 9 3, 0, 1, 0, 3, 1, 0, 6, 1

%C For k>=0, let c_k denote the variant with initial term k.

%C Naturaly, we have a=c_3.

%C For some values of k, c_k has a polynomial closed form.

%C The first such values to be known are:

%C - k=0: c_0(n) = 0 = A000004(n),

%C - k=1: c_1(n) = (n-2)^2 = A000290(n-2),

%C - k=2: c_2(n) = (n-2)*(n-3) = A002378(n-3),

%C - k=19: c_19(n) = (n-2)*(n^3 - 14*n^2 + 63*n - 88)/2,

%C - k=20: c_20(n) = (n-2)*(n-3)*(n-5)*(n-6)/2,

%C - k=22: c_22(n) = (n-2)*(n-3)*(n^2 - 11*n + 32)/2,

%C - k=40: c_40(n) = (n-2)*(n-3)*(n-5)*(n-6),

%C - k=172: c_172(n) = (n-2)*(n-3)*(n-5)*(n^3 - 23*n^2 + 172*n - 408)/12.

%C We notice that c_40 = 2*c_20.

%C As for A281409, this sequence is the first of a family (of sequences parametrized by their initial term) showing some kind of irregularity.

%C For k>=0 and n>0, let d_n(k)=c_k(n):

%C - In particular: d_1(k)=k, and a(n)=d_n(3),

%C - For any n>1, d_n is periodic.

%C The cycles for the first d_n (with n>1) are:

%C n Cycle of d_n

%C - ------------

%C 2 0

%C 3 0, 1

%C 4 0, 4, 2

%C 5 0, 9, 6, 3

%C 6 0, 16, 12, 28, 24, 40, 36, 52, 48, 4

%C 7 0, 25, 20, 45, 40, 5

%H Rémy Sigrist, <a href="/A284148/b284148.txt">Table of n, a(n) for n = 1..2000</a>

%H Rémy Sigrist, <a href="/A284148/a284148.gp.txt">PARI program for A284148</a>

%e By definition, a(1)=3.

%e a(2) must equal 3 mod 1; a(2)=0 is suitable.

%e a(3) must equal 3 mod 2 and 0 mod 1; a(3)=1 is suitable.

%e a(4) must equal 3 mod 3 and 0 mod 2 and 1 mod 1; a(4)=0 is suitable.

%e 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 Cf. A000004, A000290, A002378, A281409.

%K nonn

%O 1,1

%A _Rémy Sigrist_, Mar 21 2017