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.

A234000 Numbers of the form 4^i*(8*j+1).

Original entry on oeis.org

1, 4, 9, 16, 17, 25, 33, 36, 41, 49, 57, 64, 65, 68, 73, 81, 89, 97, 100, 105, 113, 121, 129, 132, 137, 144, 145, 153, 161, 164, 169, 177, 185, 193, 196, 201, 209, 217, 225, 228, 233, 241, 249, 256, 257, 260, 265, 272, 273, 281, 289, 292, 297, 305, 313, 321, 324, 329, 337, 345
Offset: 1

Views

Author

V. Raman, Dec 18 2013

Keywords

Comments

Squares modulo all powers of 2. - Robert Israel, Aug 26 2014
From Peter Munn, Dec 11 2019: (Start)
Closed under multiplication.
Contains all even powers of primes.
A subgroup of the positive integers under the binary operation A059897(.,.). For all n, a(n) has no Fermi-Dirac factor of 2 and if m_k denotes the number of Fermi-Dirac factors of a(n) that are congruent to k modulo 8, m_3, m_5 and m_7 have the same parity. It can further be shown (1) all numbers that meet these requirements are in the sequence and (2) this implies closure under A059897(.,.).
(End)

Crossrefs

Cf. A055046 (Numbers of the form 4^i*(8*j+3)).
Cf. A055045 (Numbers of the form 4^i*(8*j+5)).
Cf. A004215 (Numbers of the form 4^i*(8*j+7)).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    {seq(seq(4^i*(8*k+1), k = 0 .. floor((N * 4^(-i)-1)/8)),i=0..floor(log[4](N)))}; # Robert Israel, Aug 26 2014
  • PARI
    is_A234000(n)=(n/4^valuation(n, 4))%8==1 \\ Charles R Greathouse IV and V. Raman, Dec 19 2013; minor improvement by M. F. Hasler, Jan 02 2014
    
  • PARI
    list(lim)=my(v=List(),t); for(e=0,logint(lim\1,4), t=4^e; forstep(k=t, lim, 8*t, listput(v,k))); Set(v) \\ Charles R Greathouse IV, Jan 12 2017
    
  • Python
    from itertools import count, islice
    def A234000_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:not (m:=(~n&n-1).bit_length())&1 and (n>>m)&7==1,count(max(startvalue,1)))
    A234000_list = list(islice(A234000_gen(),30)) # Chai Wah Wu, Jul 09 2022
    
  • Python
    def A234000(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): return n+x-sum(((x>>(i<<1))-1>>3)+1 for i in range((x.bit_length()>>1)+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

a(n) = 6n + O(log n). - Charles R Greathouse IV, Dec 19 2013
a(n) = A055044(n)/2. - Chai Wah Wu, Mar 19 2025