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.

A116852 Number of partitions of n-th semiprime into 2 squares.

This page as a plain text file.
%I A116852 #12 Jun 10 2020 22:45:50
%S A116852 1,0,1,1,0,0,0,0,2,1,0,1,0,0,0,0,1,0,0,0,1,0,2,0,1,0,1,2,0,0,0,0,0,0,
%T A116852 1,0,0,0,0,1,1,0,0,0,0,0,0,0,2,1,0,0,0,0,0,2,0,1,0,2,0,1,0,1,0,2,0,0,
%U A116852 0,0,0,0,1,0,2,1,0,0,0,0,0,0,0,0,2,0,1
%N A116852 Number of partitions of n-th semiprime into 2 squares.
%C A116852 See also A000161 Number of partitions of n into 2 squares (when order does not matter and zero is allowed).
%C A116852 From _Robert Israel_, Jun 10 2020: (Start)
%C A116852   a(1)=1 if A001358(n) = p^2 where p is not in A002144.
%C A116852   a(n)=1 if A001358(n) = 2*p where p is in A002144.
%C A116852   a(n)=2 if A001358(n) = p*q where p and q are in A002144 (not necessarily distinct).
%C A116852   a(n)=0 otherwise. (End)
%H A116852 Robert Israel, <a href="/A116852/b116852.txt">Table of n, a(n) for n = 1..10000</a>
%F A116852 a(n) = A000161(A001358(n)).
%e A116852 a(1) = 1 because semiprime(1) = 4 = 0^2 + 2^2, the unique sum of squares.
%e A116852 a(2) = 0 because semiprime(2) = 6 has no decomposition into sum of 2 squares because it has a prime factor p == 3 (mod 4) with an odd power.
%e A116852 a(3) = 1 because semiprime(3) = 9 = 0^2 + 3^2, the unique sum of squares.
%e A116852 a(4) = 1 because semiprime(4) = 10 = 2*5 = 1^2 + 3^2.
%e A116852 a(9) = 2 because semiprime(9) = 25 = 0^2 + 5^2 = 3^2 + 4^2, two distinct ways.
%e A116852 a(23) = 2 because semiprime(23) = 65 = 5*13 = 1^2 + 8^2 = 4^2 + 7^2.
%e A116852 a(28) = 2 because semiprime(28) = 85 = 5*17 = 2^2 + 9^2 = 6^2 + 7^2.
%e A116852 a(49) = 2 because semiprime(49) = 145 = 5*29 = 1^2 + 12^2 = 8^2 + 9^2.
%e A116852 a(56) = 2 because semiprime(56) = 169 = 0^2 + 13^2 = 5^2 + 12^2.
%e A116852 a(60) = 2 because semiprime(60) = 185 = 5*37 = 4^2 + 13^2 = 8^2 + 11^2.
%p A116852 R:= NULL: count:= 0:
%p A116852 for n from 4 while count < 100 do
%p A116852   if numtheory:-bigomega(n) = 2 then
%p A116852     count:= count+1;
%p A116852     F:= ifactors(n)[2];
%p A116852     if nops(F) = 1 then
%p A116852       if F[1][1] mod 4 = 1 then v:= 2
%p A116852       else v:= 1
%p A116852       fi
%p A116852     elif F[1][1]=2 and F[2][1] mod 4 = 1 then v:= 1
%p A116852     elif F[1][1] mod 4 = 1 and F[2][1] mod 4 = 1 then v:= 2
%p A116852     else v:= 0
%p A116852     fi;
%p A116852     R:= R, v;
%p A116852   fi
%p A116852 od:
%p A116852 R; # _Robert Israel_, Jun 10 2020
%Y A116852 Cf. A000161, A001358.
%K A116852 easy,nonn
%O A116852 1,9
%A A116852 _Jonathan Vos Post_, Mar 15 2006
%E A116852 More terms from _Giovanni Resta_, Jun 15 2016