A255933 a(n) is the largest integer m such that s/(m!-1) is an integer, where s is the sum of all previous terms; a(1)=1.
1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 4, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 4, 5, 2, 2, 2, 3, 2, 3, 4, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 4, 2, 2, 5, 2, 3, 2, 3, 4, 2, 2, 2, 2, 3, 2
Offset: 1
Keywords
Programs
-
Maple
a(5) = 2 since (1+2+2+3)/(n!-1) = 8/(2!-1) = 8, an integer. a(6) = 3 since (1+2+2+3+2)/(n!-1) = 10/(3!-1) = 2, an integer.
-
PARI
lista(nn) = {v = [1]; s = 1; print1(s, ", "); for (n=2, nn, k = 2; while(k!-1 <= s, k++); until (type(s/(k!-1)) == "t_INT", k--); s += k; print1(k, ", "); v = concat(v, k););} \\ Michel Marcus, Mar 11 2015
Comments