|
|
A061397
|
|
Characteristic function sequence of primes multiplied componentwise by N, the natural numbers.
|
|
36
|
|
|
0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13, 0, 0, 0, 17, 0, 19, 0, 0, 0, 23, 0, 0, 0, 0, 0, 29, 0, 31, 0, 0, 0, 0, 0, 37, 0, 0, 0, 41, 0, 43, 0, 0, 0, 47, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 59, 0, 61, 0, 0, 0, 0, 0, 67, 0, 0, 0, 71, 0, 73, 0, 0, 0, 0, 0, 79, 0, 0, 0, 83, 0, 0, 0, 0, 0, 89, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Frequently, holes in a sequence are filled with zeros. This is a canonical way to do this and applied here to primes(A000040). A pre-scalar product when summation is omitted.
|
|
LINKS
|
|
|
FORMULA
|
a(1)=0; for n>=1, a(n)=0, if either p_1|n or p_2|n or...or p_i|n, when n is in [p_i^2,p_(i+1)^2), i=1,2,..], where p_i is the i-th prime; otherwise a(n)=n. - Vladimir Shevelev, Apr 24 2010
G.f.: x*f'(x), where f(x) = Sum_{k>=1} x^prime(k). - Ilya Gutkovskiy, Apr 10 2017
a(n) = (2*n-1)! mod n^2, by Wilson's theorem. - Thomas Ordowski, Dec 27 2017
|
|
EXAMPLE
|
If 1<n<=8, a(n)=0 iff it is even on interval [4,9); if 9<=n<=25, then a(n)=0 iff n is either even or multiple of 3 on interval [9,25) etc. - Vladimir Shevelev, Apr 24 2010
|
|
MAPLE
|
seq(`if`(isprime(n), n, 0), n=1..100); # Robert Israel, May 02 2016
|
|
MATHEMATICA
|
If[PrimeQ@ #, #, 0] & /@ Range@ 94 (* or *)
|
|
PROG
|
(Haskell)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|