OFFSET
1,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
A191558 := proc(n) if isprime(n) then 0; else n; end if; end proc:
seq(A191558(n), n=1..80) ; # R. J. Mathar, Jun 11 2011
MATHEMATICA
Table[If[PrimeQ[n], 0, n], {n, 150}] (* Vincenzo Librandi, May 17 2014 *)
(*recurrence*)
Clear[t];
nn = 94;
t[1, 1] = 1;
t[n_, k_] :=
t[n, k] =
If[n == k, n*(1 - Product[t[n, k - i], {i, 1, k - 1}]),
If[n > k, t[n - k, k], 1]];
Table[t[n, n], {n, 1, nn}](* Mats Granvik, Jul 05 2014 *)
Table[n (1 - PrimePi[n] + PrimePi[n - 1]), {n, 50}] (* Wesley Ivan Hurt, Jul 06 2014 *)
PROG
(Magma) [IsPrime(n) select 0 else n: n in [1..100]]; // Vincenzo Librandi, May 17 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jun 07 2011
STATUS
approved