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 A155717 #21 Aug 11 2021 09:03:15 %S A155717 8,11,16,23,29,32,37,43,44,53,56,64,67,71,72,77,79,88,92,99,107,109, %T A155717 112,113,116,121,127,128,137,144,148,149,151,161,163,172,176,179,184, %U A155717 191,193,197,200,203,207,211,212,224,232,233,239,253,256,259,261,263,268 %N A155717 Numbers of the form N = a^2 + 7b^2 for some positive integers a,b. %C A155717 Subsequence of A020670 (which allows for a and b to be zero). %C A155717 If N=a^2+7*b^2 is a term then 7*N=(7*b)^2+7*a^2 is also a term. Conversely,if 7*N is a term then N is a term. Example: N=56; N/7=8 is a term, N*7=7^2+7*7^2 is a term. Sequences A154777, A092572 and A154778 have the same property with 7 replaced by prime numbers 2,3 and 5 respectively. - _Jerzy R Borysowicz_, May 22 2020 %t A155717 Select[Range[300], Reduce[a>0 && b>0 && # == a^2 + 7b^2, {a, b}, Integers] =!= False&] (* _Jean-François Alcover_, Nov 17 2016 *) %o A155717 (PARI) isA155717(n,/* optional 2nd arg allows us to get other sequences */c=7) = { for(b=1,sqrtint((n-1)\c), issquare(n-c*b^2) & return(1))} %o A155717 for( n=1,300, isA155717(n) & print1(n",")) %o A155717 (Python) %o A155717 def aupto(limit): %o A155717 cands = range(1, int(limit**.5)+2) %o A155717 nums = [a**2 + 7*b**2 for a in cands for b in cands] %o A155717 return sorted(set(k for k in nums if k <= limit)) %o A155717 print(aupto(268)) # _Michael S. Branicky_, Aug 11 2021 %Y A155717 Cf. A000404, A154777, A092572, A097268, A154778, A155707-A155716, A155560-A155578. %K A155717 easy,nonn %O A155717 1,1 %A A155717 _M. F. Hasler_, Jan 25 2009