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.

A300951 a(n) = Product_{j=1..floor(n/2)} p(j) where p(j) = j if j is prime else 1.

This page as a plain text file.
%I A300951 #22 Dec 25 2019 15:13:28
%S A300951 1,1,1,1,2,2,6,6,6,6,30,30,30,30,210,210,210,210,210,210,210,210,2310,
%T A300951 2310,2310,2310,30030,30030,30030,30030,30030,30030,30030,30030,
%U A300951 510510,510510,510510,510510,9699690,9699690,9699690,9699690,9699690,9699690,9699690
%N A300951 a(n) = Product_{j=1..floor(n/2)} p(j) where p(j) = j if j is prime else 1.
%C A300951 a(4*n+2)=a(4*n+3)=a(4*n+4)=a(4*n+5) for n >= 1. - _Robert Israel_, Mar 16 2018
%C A300951 The length of the n-th run is given by 2*A054541(n). - _Michel Marcus_, Mar 17 2018
%H A300951 Robert Israel, <a href="/A300951/b300951.txt">Table of n, a(n) for n = 0..4713</a>
%F A300951 a(n) = A002110(A056172(n)). - _Robert Israel_, Mar 16 2018
%p A300951 a := n -> mul(`if`(isprime(j), j, 1), j=1..iquo(n,2)):
%p A300951 seq(a(n), n=0..44);
%p A300951 # Alternative:
%p A300951 f:= proc(n) option remember;
%p A300951   if n::even and isprime(n/2) then procname(n-1)*n/2 else procname(n-1) fi
%p A300951 end proc:
%p A300951 f(0):= 1:
%p A300951 map(f, [$0..100]); # _Robert Israel_, Mar 16 2018
%t A300951 {#,#}&/@FoldList[Times,Table[If[PrimeQ[n],n,1],{n,0,30}]]//Flatten (* _Harvey P. Dale_, Dec 25 2019 *)
%o A300951 (PARI) a(n) = prod(i=1, n\2, if(isprime(i), i, 1)); \\ _Altug Alkan_, Mar 16 2018
%Y A300951 Cf. A002110, A054541, A056172, A089026.
%K A300951 nonn
%O A300951 0,5
%A A300951 _Peter Luschny_, Mar 16 2018