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 A108269 #32 Jan 29 2025 14:32:33 %S A108269 4,12,16,20,28,36,44,48,52,60,64,68,76,80,84,92,100,108,112,116,124, %T A108269 132,140,144,148,156,164,172,176,180,188,192,196,204,208,212,220,228, %U A108269 236,240,244,252,256,260,268,272,276,284,292,300,304,308,316,320,324,332 %N A108269 Numbers of the form (2*m - 1)*4^k where m >= 1, k >= 1. %C A108269 Numbers of terms in nonnegative integer sequences the sum of which is never a square. %C A108269 The sum of a sequence of consecutive nonnegative integers starting with k is never a square for any k, if and only if the number of the terms in the sequence can be expressed as (2*m - 1) * 2^(2*n), m and n being any positive integers. (Proved by Alfred Vella, Jun 14 2005.) %C A108269 Odious and evil terms alternate. - _Vladimir Shevelev_, Jun 22 2009 %C A108269 Even numbers whose binary representation ends in an even number of zeros. - _Amiram Eldar_, Jan 12 2021 %C A108269 From _Antti Karttunen_, Jan 28 2023: (Start) %C A108269 Numbers k for which the parity of k is equal to that of A048675(k). %C A108269 A multiplicative semigroup; if m and n are in the sequence then so is m*n. (End) %H A108269 Amiram Eldar, <a href="/A108269/b108269.txt">Table of n, a(n) for n = 1..10000</a> %F A108269 a(n) = 6*n + O(log n). - _Charles R Greathouse IV_, Nov 03 2016 [Corrected by _Amiram Eldar_, Jan 12 2021] %F A108269 a(n) = 2 * A036554(n) = 4 * A003159(n). - _Amiram Eldar_, Jan 12 2021 %e A108269 a( 1, 1 ) = 4, a( 2, 1) = 12, etc. %e A108269 For a( 1, 1 ): the sum of 4 consecutive nonnegative integers (4k+6, if the first term is k) is never a square. %t A108269 Select[2 * Range[200], EvenQ @ IntegerExponent[#, 2] &] (* _Amiram Eldar_, Jan 12 2021 *) %o A108269 (PARI) is(n)=my(e=valuation(n,2)); e>1 && e%2==0 \\ _Charles R Greathouse IV_, Nov 03 2016 %o A108269 (Python) %o A108269 def A108269(n): %o A108269 def bisection(f,kmin=0,kmax=1): %o A108269 while f(kmax) > kmax: kmax <<= 1 %o A108269 kmin = kmax >> 1 %o A108269 while kmax-kmin > 1: %o A108269 kmid = kmax+kmin>>1 %o A108269 if f(kmid) <= kmid: %o A108269 kmax = kmid %o A108269 else: %o A108269 kmin = kmid %o A108269 return kmax %o A108269 def f(x): %o A108269 c, s = n+(x+1>>1), bin(x)[2:] %o A108269 l = len(s) %o A108269 for i in range(l&1,l,2): %o A108269 c += int(s[i])+int('0'+s[:i],2) %o A108269 return c %o A108269 return bisection(f,n,n) # _Chai Wah Wu_, Jan 29 2025 %Y A108269 Intersection of A005843 and A003159. %Y A108269 Cf. A000069, A001969, A017113 (primitive terms), A036554, A328981 (characteristic function), A359794 (complement). %K A108269 nonn,easy %O A108269 1,1 %A A108269 Andras Erszegi (erszegi.andras(AT)chello.hu), May 30 2005 %E A108269 Entry revised by _N. J. A. Sloane_, Jun 26 2005 %E A108269 More terms from _Amiram Eldar_, Jan 12 2021