The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A278210 Last residue class to appear in the partition numbers mod n. 2

%I #10 Nov 22 2016 10:03:42

%S 0,0,0,0,4,0,6,4,8,9,10,4,6,6,4,12,0,8,10,8,6,10,18,16,21,13,16,27,24,

%T 19,27,8,10,26,29,18,25,16,0,28,27,6,32,21,19,33,13,13,13,21,0,18,23,

%U 48,28,16,26,34,26,4,33,35,4,40,52,10,65,34,62,16,40,12,66,48,21,18,6,13,72,46,19,20

%N Last residue class to appear in the partition numbers mod n.

%C Let k be the smallest number such that {p(1), p(2), ..., p(k)} contains each residue class mod n, where p(m) is the m-th partition number A000041(m). Then a(n) = p(k) mod n.

%H Charles R Greathouse IV, <a href="/A278210/b278210.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000041(A278209(n)) mod n.

%e p(1) = 1, p(2) = 2, p(3) = 3, p(4) = 5, p(5) = 7, p(6) = 11, p(7) = 15, p(8) = 22, p(9) = 30, p(10) = 42, and p(11) = 56. Mod 4 these are 1, 2, 3, 1, 3, 3, 3, 2, 2, 2, and 0 respectively. The last term to appear is 0 mod 4 at index 11, so a(4) = 0.

%t Table[k = 1; While[Length@ Union@ Map[Mod[PartitionsP@ #, n] &, Range@ k] != n, k++]; Mod[PartitionsP@ k, n], {n, 82}] (* _Michael De Vlieger_, Nov 21 2016 *)

%o (PARI) a(n)=if(n==1, return(1)); my(v=vectorsmall(n),s=1,t,k=1); v[2]=1; while(s<n,t=numbpart(k++)%n; if(v[t+1]==0, v[t+1]=1; if(s++==n, return(t))))

%Y Cf. A000041, A278209.

%K nonn

%O 1,5

%A _Charles R Greathouse IV_, Nov 15 2016

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 June 1 10:29 EDT 2024. Contains 373016 sequences. (Running on oeis4.)