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 A172126 #15 Sep 01 2024 09:37:15 %S A172126 1,4,10,16,40,64,85,160,256,340,640,682,1024,1360,2560,2728,4096,5440, %T A172126 5461,10240,10912,16384,21760,21844,40960,43648,43690,65536,87040, %U A172126 87376,163840,174592,174760,262144,348160,349504,349525,655360,698368,699040,1048576,1392640 %N A172126 Terms of A181666 of the form 3*k+1. %C A172126 Numbers of the form 2^m*(4^k-1)/3 and, simultaneously, of the form 3*j+1, for k>0, j,m>=0. %H A172126 Amiram Eldar, <a href="/A172126/b172126.txt">Table of n, a(n) for n = 1..10000</a> %t A172126 seq[max_] := Module[{kmax = Floor[Log[4, 3*max+1]], s = {}, s1, odd},Do[odd = (4^k-1)/3; s1 = 2^Range[0, Floor[Log2[max/odd]]] * odd; s = Join[s, s1], {k, 1, kmax}]; Select[Union[s], Mod[#, 3] == 1 &]]; seq[1500000] (* _Amiram Eldar_, Aug 31 2024 *) %o A172126 (PARI) for(n=1, 300000, o=3*n/2^valuation(n, 2)+1; b=ispower(o); if(b&&b%2==0&&round(sqrtn(o, b/2))==4&&(n-1)%3==0, print1(n, ", "))) %Y A172126 Cf. A181666. %K A172126 nonn %O A172126 1,2 %A A172126 _Ralf Stephan_, Nov 19 2010 %E A172126 More terms from _Amiram Eldar_, Aug 31 2024