OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{k=1..2n} floor(cos^2(Pi*(n-1)!^(k-1)/(k-1)!)) - Sum_{k=1..n} floor(cos^2(Pi*(k-1)!^n/n!)). - Anthony Browne, May 24 2016
EXAMPLE
The run of composites (24,25,26,27,28) becomes (28,27,26,25,24).
MATHEMATICA
Block[{$MaxExtraPrecision = 1000}, Table[Sum[Floor[Cos[Pi (n - 1)!^(k - 1)/(k - 1)!]^2], {k, 2 n}] - Sum[ Floor[Cos[Pi (k - 1)!^n/n!]^2], {k, n}], {n, 72}]] (* Michael De Vlieger, May 24 2016 *)
PROG
(PARI) {m=73; print1(1, ", "); n=2; while(n<=m, while(isprime(n), print1(n, ", "); n++); k=n; while(!isprime(n), n++); forstep(a=n-1, k, -1, print1(a, ", ")))} \\ Klaus Brockhaus, Aug 16 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 23 2006
EXTENSIONS
More terms from Klaus Brockhaus, Aug 16 2006
STATUS
approved