OFFSET
1,2
LINKS
Robin Visser, Table of n, a(n) for n = 1..10000 (terms n = 1..1000 from Vincenzo Librandi).
FORMULA
a(n) = Card(Union{j=1..n} binomial(n,j) mod j).
EXAMPLE
n=14: {binomial(14,j) mod j, j=1..14} = {0,1,1,1,2,3,2,3,4,1,1,7,1,1} includes six distinct residues (0,1,2,3,4,7) so a(14) = 6.
MATHEMATICA
Table[Length[Union[Table[Mod[Binomial[n, j], j], {j, 1, n}]]], {n, 1, 256}]
PROG
(PARI) a(n) = #vecsort(vector(n, j, binomial(n, j) % j), , 8); \\ Michel Marcus, Jul 29 2017
(Sage) def a(n):
return len(set([binomial(n, j)%j for j in range(1, n+1)])) # Robin Visser, Nov 26 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Mar 21 2003
STATUS
approved