OFFSET
0,3
COMMENTS
LINKS
Griffin N. Macris, Table of n, a(n) for n = 0..999
FORMULA
a(0) = 1
a(n) = Sum_{k=1..n} a(n-k)*ceiling(sin(k)).
EXAMPLE
a(4) = 1*ceiling(sin(4)) + 1*ceiling(sin(3)) + 2*ceiling(sin(2)) + 4*ceiling(sin(1)) = 1*0 + 1*1 + 2*1 + 4*1 = 7.
MATHEMATICA
A[0] := 1
A[n_] := A[n] = If[n <= 0, 0, Sum[A[n - k]Ceiling[Sin[k]], {k, 1, n}]]
PROG
(Java)
int limit = 500; //limit index, can be changed for more terms
BigInteger[] n = new BigInteger[limit];
n[0] = BigInteger.ONE;
System.out.println("0 1");
for ( int i = 1; i < n.length; i++ ) {
n[i] = BigInteger.ZERO;
for(int k = 1; k <= i; k++) {
n[i] = n[i].add(n[i-k].multiply(BigInteger.valueOf((long) Math.ceil(Math.sin(k)))));
}
System.out.println(i+" "+n[i]);
}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Griffin N. Macris, Apr 06 2016
STATUS
approved