cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A309103 a(n) = Sum_{k >= 0} (-1)^k * floor(n^k / k!).

This page as a plain text file.
%I A309103 #6 Jul 14 2019 06:26:26
%S A309103 1,0,0,0,0,-1,-1,-2,-1,-3,0,1,0,-2,-1,-2,2,1,1,2,-2,2,0,-2,-3,0,-1,-2,
%T A309103 0,-2,3,-8,1,-4,-3,-4,1,-2,1,-3,-2,-2,2,2,3,3,2,0,-5,-2,-3,-5,-2,-4,3,
%U A309103 4,-2,-2,4,-7,3,5,3,5,0,-1,1,-8,6,-3,-1,8,-5,0,-6
%N A309103 a(n) = Sum_{k >= 0} (-1)^k * floor(n^k / k!).
%C A309103 This sequence mimics the Maclaurin series for the function x -> exp(-x).
%C A309103 The series in the name is well defined; for any n > 0, only the first A065027(n) terms are different from zero.
%e A309103 For n = 3:
%e A309103 - we have:
%e A309103   k  floor(3^k / k!)
%e A309103   -  ---------------
%e A309103   0                1
%e A309103   1                3
%e A309103   2                4
%e A309103   3                4
%e A309103   4                3
%e A309103   5                2
%e A309103   6                1
%e A309103   >=7              0
%e A309103 - hence a(3) = 1 - 3 + 4 - 4 + 3 - 2 + 1 = 0.
%o A309103 (PARI) a(n) = { my (v=0, d=1, s=+1); for (k=1, oo, if (d<1, return (v), v += s*floor(d); d *= n/k; s = -s)) }
%Y A309103 See A309087 for similar sequences.
%Y A309103 Cf. A065027.
%K A309103 sign
%O A309103 0,8
%A A309103 _Rémy Sigrist_, Jul 12 2019