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.

A061397 Characteristic function sequence of primes multiplied componentwise by N, the natural numbers.

This page as a plain text file.
%I A061397 #108 Mar 16 2025 08:55:26
%S A061397 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,
%T A061397 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,
%U A061397 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
%N A061397 Characteristic function sequence of primes multiplied componentwise by N, the natural numbers.
%C A061397 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.
%C A061397 Equals row sums of triangle A143536. - _Gary W. Adamson_, Aug 23 2008
%C A061397 Mobius transform of sum of the distinct primes dividing n (A008472). - _Steven Foster Clark_, Jun 26 2020
%H A061397 Reinhard Zumkeller, <a href="/A061397/b061397.txt">Table of n, a(n) for n = 1..10000</a>
%H A061397 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeZetaFunction.html">Prime zeta function</a>.
%F A061397 a(n) = A010051(n)*A000027(n).
%F A061397 Dirichlet generating function: primezeta(s-1). - _Franklin T. Adams-Watters_, Sep 11 2005
%F A061397 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
%F A061397 a(n) = n*floor(gcd(((n-1)! + 1)/n,2)). - _José de Jesús Camacho Medina_, Apr 30 2016
%F A061397 a(n) = n*floor(1/A001065(n)); for n>1. - _José de Jesús Camacho Medina_, Aug 07 2016
%F A061397 G.f.: x*f'(x), where f(x) = Sum_{k>=1} x^prime(k). - _Ilya Gutkovskiy_, Apr 10 2017
%F A061397 a(n) = (2*n-1)! mod n^2, by Wilson's theorem. - _Thomas Ordowski_, Dec 27 2017
%e A061397 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
%p A061397 seq(`if`(isprime(n),n,0), n=1..100); # _Robert Israel_, May 02 2016
%t A061397 If[PrimeQ@ #, #, 0] & /@ Range@ 94 (* or *)
%t A061397 Replace[#, n_ /; ! PrimeQ@ n -> 0] & /@ Range@ 94 (* _Michael De Vlieger_, May 02 2016 *)
%t A061397 Table[n*Floor[GCD[((n-1)! + 1)/n, 2]], {n, 2, 100}] (* _José de Jesús Camacho Medina_, Apr 30 2016 *)
%o A061397 (PARI) a(n)=if(isprime(n),n) \\ _Charles R Greathouse IV_, Oct 29 2011
%o A061397 (Haskell)
%o A061397 a061397 n = (fromIntegral $ a010051 n) * n  -- _Reinhard Zumkeller_, Mar 21 2014
%Y A061397 Cf. A000040, A010051, A143536.
%Y A061397 Cf. A034387 (partial sums).
%K A061397 nonn,easy
%O A061397 1,2
%A A061397 _Labos Elemer_, Jun 07 2001