login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A191558 a(n) = 0 if n prime, otherwise n. 6
1, 0, 0, 4, 0, 6, 0, 8, 9, 10, 0, 12, 0, 14, 15, 16, 0, 18, 0, 20, 21, 22, 0, 24, 25, 26, 27, 28, 0, 30, 0, 32, 33, 34, 35, 36, 0, 38, 39, 40, 0, 42, 0, 44, 45, 46, 0, 48, 49, 50, 51, 52, 0, 54, 55, 56, 57, 58, 0, 60, 0, 62, 63, 64, 65, 66, 0, 68, 69, 70, 0, 72, 0, 74, 75, 76, 77, 78, 0, 80, 81, 82, 0, 84, 85, 86, 87, 88, 0, 90, 91, 92, 93, 94 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = n * A005171(n) = n - A061397(n). - R. J. Mathar, Jun 11 2011
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
Cf. A002808.
Sequence in context: A327964 A085562 A037282 * A075083 A179939 A163407
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jun 07 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 14:18 EDT 2024. Contains 371960 sequences. (Running on oeis4.)