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.

A009188 Short leg of more than one Pythagorean triangle.

This page as a plain text file.
%I A009188 #48 Oct 17 2024 17:41:28
%S A009188 9,12,15,16,18,20,21,24,25,27,28,30,32,33,35,36,39,40,42,44,45,48,49,
%T A009188 50,51,52,54,55,56,57,60,63,64,65,66,68,69,70,72,75,76,77,78,80,81,84,
%U A009188 85,87,88,90,91,92,93,95,96,98,99,100,102,104,105,108,110,111,112,114,115,116
%N A009188 Short leg of more than one Pythagorean triangle.
%C A009188 Values of n for which composite n X n magic squares are possible. - _J. Lowell_, May 20 2010
%C A009188 If n is in the sequence, k*n is in the sequence for all k > 1. So odd semiprimes (A046315) and numbers of the form 4*p where p is an odd prime are core subsequences which give the initial terms of arithmetic progressions in this sequence. - _Altug Alkan_, Nov 29 2015
%C A009188 Numbers appearing more than once in A009004. - _Sean A. Irvine_, Apr 20 2018
%H A009188 Robert Israel, <a href="/A009188/b009188.txt">Table of n, a(n) for n = 1..10000</a>
%F A009188 a(n) = A264828(n+2). - _Chai Wah Wu_, Oct 17 2024
%p A009188 filter:= proc(n) not isprime(n) and (n::odd or not isprime(n/2)) end proc:
%p A009188 select(filter, [$9 .. 10000]); # _Robert Israel_, Nov 30 2015
%t A009188 filterQ[n_] := !PrimeQ[n] && (OddQ[n] || !PrimeQ[n/2]);
%t A009188 Select[Range[9, 120], filterQ] (* _Jean-François Alcover_, Feb 28 2019, from Maple *)
%o A009188 (PARI) forcomposite(n=9, 1e3, if(n % 2 == 1 || !isprime(n/2), print1(n, ", "))) \\ _Altug Alkan_, Dec 01 2015
%o A009188 (Python)
%o A009188 from sympy import primepi
%o A009188 def A009188(n):
%o A009188     def f(x): return int(n+2+primepi(x)+primepi(x>>1))
%o A009188     m, k = n+2, f(n+2)
%o A009188     while m != k: m, k = k, f(k)
%o A009188     return m # _Chai Wah Wu_, Oct 17 2024
%Y A009188 Cf. A001749, A009004, A020884, A046315, A264828.
%K A009188 nonn
%O A009188 1,1
%A A009188 _David W. Wilson_