A108269 Numbers of the form (2*m - 1)*4^k where m >= 1, k >= 1.
4, 12, 16, 20, 28, 36, 44, 48, 52, 60, 64, 68, 76, 80, 84, 92, 100, 108, 112, 116, 124, 132, 140, 144, 148, 156, 164, 172, 176, 180, 188, 192, 196, 204, 208, 212, 220, 228, 236, 240, 244, 252, 256, 260, 268, 272, 276, 284, 292, 300, 304, 308, 316, 320, 324, 332
Offset: 1
Examples
a( 1, 1 ) = 4, a( 2, 1) = 12, etc. For a( 1, 1 ): the sum of 4 consecutive nonnegative integers (4k+6, if the first term is k) is never a square.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[2 * Range[200], EvenQ @ IntegerExponent[#, 2] &] (* Amiram Eldar, Jan 12 2021 *)
-
PARI
is(n)=my(e=valuation(n,2)); e>1 && e%2==0 \\ Charles R Greathouse IV, Nov 03 2016
-
Python
def A108269(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): c, s = n+(x+1>>1), bin(x)[2:] l = len(s) for i in range(l&1,l,2): c += int(s[i])+int('0'+s[:i],2) return c return bisection(f,n,n) # Chai Wah Wu, Jan 29 2025
Formula
a(n) = 6*n + O(log n). - Charles R Greathouse IV, Nov 03 2016 [Corrected by Amiram Eldar, Jan 12 2021]
Extensions
Entry revised by N. J. A. Sloane, Jun 26 2005
More terms from Amiram Eldar, Jan 12 2021
Comments