cp's OEIS Frontend

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.

A217319 Numbers with binary representation ending in 4*k+2 or 4*k+3 zeros.

Original entry on oeis.org

4, 8, 12, 20, 24, 28, 36, 40, 44, 52, 56, 60, 64, 68, 72, 76, 84, 88, 92, 100, 104, 108, 116, 120, 124, 128, 132, 136, 140, 148, 152, 156, 164, 168, 172, 180, 184, 188, 192, 196, 200, 204, 212, 216, 220, 228, 232, 236, 244, 248, 252, 260, 264, 268, 276, 280
Offset: 1

Views

Author

Vladimir Shevelev, Mar 18 2013

Keywords

Comments

Or numbers having infinitary divisor 4, or the same, having factor 4 in Fermi-Dirac representation as a product of distinct terms of A050376.
From Peter Munn, Aug 25 2020: (Start)
Compare the terms, as a set, with A145204\{0} (numbers having 3 as a Fermi-Dirac factor). The self-inverse function defined by A225546 maps the members of either one of these sets 1:1 onto the other set.
Numbers whose 4th-power-free part is divisible by 4.
(End)
Numbers k such that the exponent of the highest power of 4 dividing k, A235127(k), is odd. The asymptotic density of this sequence is 1/5. - Amiram Eldar, Sep 20 2020

Crossrefs

Related to A145204\{0} via A225546.

Programs

  • Maple
    isA007814 := proc(n)
        if modp( A007814(n),4) in {2,3} then
            true ;
        else
            false ;
        end if;
    end proc:
    for n from 1 to 1000 do
        if isA007814(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Nov 22 2023
  • Mathematica
    okQ[n_] := (cnt = Count[ Split[ IntegerDigits[n, 2]] // Last, 0]; k0 = k /. ToRules@ Reduce[ (cnt == 2*k || cnt == 2*k+1), k, Integers]; OddQ[k0]); Select[ Range[312], okQ] (* Jean-François Alcover, Mar 18 2013 *)
    Select[Map[# Boole[IntegerQ[(1/4 (1+#))]||IntegerQ[(1/4 (2+#))]&[Length[Last[Split[IntegerDigits[#,2]]]]]]&,Range[2,500,2]],#>0&]
    Select[Range[280], OddQ @ IntegerExponent[#, 4] &] (* Amiram Eldar, Sep 20 2020 *)
  • Python
    def A217319(n):
        def f(x): return n+x-sum((k:=x>>(m<<1))-(k>>2) for m in range(0,(x.bit_length()+1>>1),2))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m<<2 # Chai Wah Wu, May 25 2025

Formula

Conjecture. For n>=1, a(n) = A171949(n+1).

Extensions

Named edited by David A. Corneth, Sep 22 2020