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.

A333443 Numbers k such that both k and k+1 are sums of two positive squares in 2 or more ways.

This page as a plain text file.
%I A333443 #21 May 13 2020 07:04:46
%S A333443 985,1585,1768,1780,2249,2329,2500,2929,3280,3649,3977,4264,4329,4705,
%T A333443 4849,5017,5044,5065,5140,5161,5512,5617,5625,6340,6409,6697,7240,
%U A333443 7684,7785,7956,7969,8020,8065,8320,8584,8905,9089,9265,9529,9553,9593,9700,9809
%N A333443 Numbers k such that both k and k+1 are sums of two positive squares in 2 or more ways.
%C A333443 Numbers k such that both k and k+1 belong to A007692.
%H A333443 Amiram Eldar, <a href="/A333443/b333443.txt">Table of n, a(n) for n = 1..10000</a>
%e A333443 985 is a term since 12^2 + 29^2 = 16^2 + 27^2 = 985 and 5^2 + 31^2 = 19^2 + 25^2 = 986.
%e A333443 625 is not a term because 626 cannot be written as the sum of two positive squares in more than one way.
%t A333443 ok[n_] := Length@ IntegerPartitions[n, {2}, Range[Sqrt@ n]^2] >= 2; Select[ Range@ 10000, ok[#] && ok[#+1] &] (* _Giovanni Resta_, Mar 24 2020 *)
%o A333443 (Python)
%o A333443 n=100
%o A333443 t=[]
%o A333443 prev=0
%o A333443 A333443=[]
%o A333443 for i in range(1,n+1):
%o A333443     t.append(i*i)
%o A333443 for j in range(n**2):
%o A333443     n=0
%o A333443     for k in t[:j+1]:
%o A333443         if j-k in t and k<=j-k:
%o A333443             n=n+1
%o A333443             if n>1:
%o A333443                 if j-prev==1:
%o A333443                     A333443.append(j-1)
%o A333443                 prev=j
%Y A333443 Subsequence of A007692.
%Y A333443 Cf. A085323, A140612.
%K A333443 easy,nonn
%O A333443 1,1
%A A333443 _Mateusz Winiarski_, Mar 21 2020