OFFSET
1,1
COMMENTS
Numbers n such that (n+j) mod (2+j) = 1 for j from 0 to 4 and (n+5) mod 7 <> 1.
Numbers n such that n mod 60 = 3 and n mod 420 <> 3.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
G.f.: 3*x*(21+20*x+20*x^2+20*x^3+20*x^4+20*x^5+19*x^6) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-1) + a(n-6) - a(n-7) for n>7; a(n) = a(n-6) + 420 for n>6.
a(n) = (210*n - 96 - 30*cos(n*Pi/3) - 30*cos(2*n*Pi/3) - 15*cos(n*Pi) + 30*sqrt(3)*sin(n*Pi/3) + 10*sqrt(3)*sin(2*n*Pi/3))/3.
a(6k) = 420k-57, a(6k-1) = 420k-117, a(6k-2) = 420k-177, a(6k-3) = 420k-237, a(6k-4) = 420k-297, a(6k-5) = 420k-357. (End)
EXAMPLE
63 mod 2 = 64 mod 3 = 65 mod 4 = 66 mod 5 = 67 mod 6 = 1 and 68 mod 7 = 5, hence 63 is in the sequence.
MAPLE
A096023:=n->420*floor(n/6)+[63, 123, 183, 243, 303, 363][(n mod 6)+1]: seq(A096023(n), n=0..80); # Wesley Ivan Hurt, Jul 22 2016
MATHEMATICA
Select[Range[0, 5*10^3], MemberQ[{63, 123, 183, 243, 303, 363}, Mod[#, 420]] &] (* Wesley Ivan Hurt, Jul 22 2016 *)
PROG
(PARI) {k=5; m=3150; 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..3500] | n mod 420 in [63, 123, 183, 243, 303, 363] ] // Vincenzo Librandi, Mar 24 2011
(Magma) /* Alternatively:*/ &cat[ [ 60*n+3, 60*n+63 ]: n in [1..52] | n mod 7 in [1, 3, 5] ]; // Bruno Berselli, Mar 25 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Jun 15 2004
EXTENSIONS
New definition from Ralf Stephan, Dec 01 2004
STATUS
approved