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.

A319282 Numbers of the form 16^i*(16*j + 15).

Original entry on oeis.org

15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 240, 255, 271, 287, 303, 319, 335, 351, 367, 383, 399, 415, 431, 447, 463, 479, 495, 496, 511, 527, 543, 559, 575, 591, 607, 623, 639, 655, 671, 687, 703, 719, 735, 751, 752, 767, 783, 799, 815
Offset: 1

Views

Author

Jianing Song, Sep 16 2018

Keywords

Comments

{-a(n)} gives all negative fourth powers modulo all powers of 2, that is, negative fourth powers over 2-adic integers.

Crossrefs

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

Programs

  • PARI
    isA319282(n)= n\16^valuation(n, 16)%16==15
    
  • Python
    def A319282(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<<2))-15)>>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)).