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.

A287965 Smallest number which can be represented as the sum of distinct squares of primes in exactly n ways, or 0 if no such integer exists.

This page as a plain text file.
%I A287965 #16 Oct 14 2024 23:57:47
%S A287965 4,410,1014,1494,1685,2188,2335,2573,2717,2863,3054,3389,3224,3654,
%T A287965 3534,4014,4232,4183,4254,4064,4589,4618,4544,4593,4903,5193,5503,
%U A287965 5215,5579,5433,5455,5673,5962,5983,6158,6178,5744,5864,5984,5913,6223,6273,6678,6393,6442,6513,6870,6535,7038,7015
%N A287965 Smallest number which can be represented as the sum of distinct squares of primes in exactly n ways, or 0 if no such integer exists.
%C A287965 It appears that 1275 is the first k for which a(k) = 0. - _Robert Israel_, Oct 14 2024
%H A287965 Robert Israel, <a href="/A287965/b287965.txt">Table of n, a(n) for n = 1..1274</a>
%H A287965 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%F A287965 A111900(a(n)) = n.
%e A287965 a(2) = 410 because 410 = 7^2 + 19^2 = 11^2 + 17^2 and this is the smallest number that can be written as the sum of distinct squares of primes in 2 different ways.
%p A287965 N:= 100: # to try with primes up to N
%p A287965 P:= select(isprime, [2,seq(i,i=3..N,2)]):
%p A287965 nP:= nops(P):
%p A287965 S:= mul(1+x^(P[i]^2), i=1..nP):
%p A287965 M:= 100: # for a(1) .. a(M)
%p A287965 V:= Vector(M): count:= 0:
%p A287965 for i from 4 to N^2 while count < M do
%p A287965   r:= coeff(S,x,i);
%p A287965   if r >= 1 and r <= M and V[r] = 0 then count:= count+1; V[r]:= i; fi
%p A287965 od:
%p A287965 convert(V,list); # _Robert Israel_, Oct 14 2024
%Y A287965 Cf. A001248, A048261, A097563, A111900, A121518.
%K A287965 nonn
%O A287965 1,1
%A A287965 _Ilya Gutkovskiy_, Jun 03 2017