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.
%I A286366 #13 May 10 2017 21:38:00 %S A286366 4,6,8,4,13,11,9,6,28,14,8,8,13,11,21,4,12,30,8,13,65,11,9,11,40,14, %T A286366 116,9,13,23,9,6,64,14,20,28,13,11,21,14,12,66,8,8,49,11,9,8,28,42,20, %U A286366 13,13,119,21,11,64,14,8,21,13,11,269,4,84,66,8,12,65,23,9,30,12,14,56,8,65,23,9,13,484,14,8,65,85,11,21,11,12,50,20,9,65,11,21,11 %N A286366 Compound filter: a(n) = 2*A286365(n) + floor(A072400(n)/4). %C A286366 Each term of this sequence contains, in addition to the information contained in A286365 (which packs the values of A286361(n) and A286363(n) and parity of the exponent of the highest power of 2 dividing n) also the bit-2 of A072400(n) (its third least significant bit), which is here stored as the least significant bit of a(n). Note that the whole A072400(n) can be recovered based on the other information contained in a(n). Together all this information is enough - by Lagrange's "Four Squares theorem" - to determine what is the least number of squares that add up to n. Thus it follows that for all i, j: a(i) = a(j) => A002828(i) = A002828(j). %C A286366 A286369 is similar, but without the parity of the 2-adic value present. %H A286366 Antti Karttunen, <a href="/A286366/b286366.txt">Table of n, a(n) for n = 1..10000</a> %F A286366 a(n) = 2*A286365(n) + floor(A072400(n)/4). %o A286366 (Scheme) (define (A286366 n) (+ (* 2 (A286365 n)) (floor->exact (/ (A072400 n) 4)))) %o A286366 (Python) %o A286366 from sympy import factorint %o A286366 from operator import mul %o A286366 def P(n): %o A286366 f = factorint(n) %o A286366 return sorted([f[i] for i in f]) %o A286366 def a046523(n): %o A286366 x=1 %o A286366 while True: %o A286366 if P(n) == P(x): return x %o A286366 else: x+=1 %o A286366 def A(n, k): %o A286366 f = factorint(n) %o A286366 return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f]) %o A286366 def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2 %o A286366 def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3))) %o A286366 def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1") %o A286366 def a286365(n): return 2*a286364(n) + a007814(n)%2 %o A286366 def a072400(n): return int(str(int(''.join(map(str, digits(n, 4)[1:]))[::-1]))[::-1], 4)%8 %o A286366 def a(n): return 2*a286365(n) + int(a072400(n)/4) # _Indranil Ghosh_, May 09 2017 %Y A286366 Cf. A000035, A002828, A007814, A072400, A286361, A286363, A286364, A286365, A286368, A286369, A286372, A286373. %K A286366 nonn %O A286366 1,1 %A A286366 _Antti Karttunen_, May 08 2017