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.

A109403 Examine the sequence of all (even or odd) semiprimes, A001358, and record the averages of any pair of successive terms of the same parity.

This page as a plain text file.
%I A109403 #13 Aug 27 2020 12:12:06
%S A109403 5,12,18,50,53,56,60,67,89,92,113,120,126,131,144,160,173,184,186,204,
%T A109403 211,216,220,236,242,248,251,266,276,288,290,293,300,304,307,320,322,
%U A109403 328,337,340,368,374,379,384,392
%N A109403 Examine the sequence of all (even or odd) semiprimes, A001358, and record the averages of any pair of successive terms of the same parity.
%H A109403 N. J. A. Sloane, <a href="/A109403/b109403.txt">Table of n, a(n) for n = 1..20000</a>
%e A109403 5 is OK because sp(1)=4, sp(2)=6 and (4+6)/2=5; 12 is OK because sp(4)=10, sp(5)=14 and (10+14)/2=12; sp(n)=n-th semiprime.
%p A109403 A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:
%p A109403 # To produce a b-file
%p A109403 M:=50000; c:=0;
%p A109403 for n from 1 to M do
%p A109403 if type(A001358(n)+A001358(n+1),even) then c:=c+1;
%p A109403 m:=(A001358(n)+A001358(n+1))/2;
%p A109403 lprint(c,m);
%p A109403 fi; od; # _N. J. A. Sloane_, Aug 27 2020
%t A109403  Select[Mean/@Partition[Select[Range[400],PrimeOmega[#]==2&],2,1],IntegerQ] (* _Harvey P. Dale_, Aug 27 2020 *)
%Y A109403 Cf. A001358, A100484.
%K A109403 nonn
%O A109403 1,1
%A A109403 _Zak Seidov_, Jun 27 2005
%E A109403 Definition corrected by _N. J. A. Sloane_, Aug 26 2020. The original definition appeared to be based on A100484, but that was incorrect. Thanks to _Harvey P. Dale_ for pointing out that something was wrong.