OFFSET
1,1
COMMENTS
Numbers n such that n mod 840 = 423.
LINKS
Tanya Khovanova, Recursive Sequences
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = 2*a(n-1)-a(n-2). G.f.: 3*x*(139*x+141) / (x-1)^2. - Colin Barker, Apr 11 2013
a(n) = 840*n-417. [Bruno Berselli, Apr 11 2013]
EXAMPLE
423 mod 2 = 424 mod 3 = 425 mod 4 = 426 mod 5 = 427 mod 6 = 428 mod 7 = 1 and 429 mod 8 = 5, hence 423 is in the sequence.
PROG
(PARI) {k=6; m=30000; for(n=1, m, j=0; b=1; while(b&&j<k, if((n+j)%(2+j)==1, j++, b=0)); if(b&&(n+k)%(2+k)!=1, print1(n, ", ")))}
(Magma) [n: n in [1..30000] | forall{j: j in [0..5] | IsOne((n+j) mod (2+j)) and (n+6) mod 8 ne 1}]; // Bruno Berselli, Apr 11 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Jun 15 2004
STATUS
approved