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.

A319281 Numbers of the form 16^i*(16*j + 1).

Original entry on oeis.org

1, 16, 17, 33, 49, 65, 81, 97, 113, 129, 145, 161, 177, 193, 209, 225, 241, 256, 257, 272, 273, 289, 305, 321, 337, 353, 369, 385, 401, 417, 433, 449, 465, 481, 497, 513, 528, 529, 545, 561, 577, 593, 609, 625, 641, 657, 673, 689, 705, 721, 737, 753, 769, 784
Offset: 1

Views

Author

Jianing Song, Sep 16 2018

Keywords

Comments

{a(n)} gives all positive fourth powers modulo all powers of 2, that is, positive fourth powers over 2-adic integers. So this sequence is closed under multiplication.

Crossrefs

A158057 is a proper subsequence.
Perfect powers over 2-adic integers:
Squares: positive: A234000; negative: A004215 (negated);
Cubes: A191257;
Fourth powers: positive: this sequence; negative: A319282 (negated).

Programs

  • PARI
    isA319281(n)= n\16^valuation(n, 16)%16==1
    
  • Python
    def A319281(n):
        if n<3: return 15*n-14
        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-1+x-sum((((x>>(i<<2))-1)>>4)+1 for i in range(x.bit_length()>>2))
        return bisection(f,n,n) # Chai Wah Wu, Feb 17 2025

Formula

a(n) = 15*n + O(log(n)).