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.

Showing 1-2 of 2 results.

A003591 Numbers of form 2^i*7^j, with i, j >= 0.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 28, 32, 49, 56, 64, 98, 112, 128, 196, 224, 256, 343, 392, 448, 512, 686, 784, 896, 1024, 1372, 1568, 1792, 2048, 2401, 2744, 3136, 3584, 4096, 4802, 5488, 6272, 7168, 8192, 9604, 10976, 12544, 14336, 16384, 16807, 19208, 21952, 25088
Offset: 1

Views

Author

Keywords

Comments

A204455(7*a(n)) = 7, and only for these numbers. - Wolfdieter Lang, Feb 04 2012

Crossrefs

Programs

  • GAP
    Filtered([1..30000],n->PowerMod(14,n,n)=0); # Muniru A Asiru, Mar 19 2019
    
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003591 n = a003591_list !! (n-1)
    a003591_list = f $ singleton 1 where
       f s = y : f (insert (2 * y) $ insert (7 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..26000] | PrimeDivisors(n) subset [2,7]]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    fQ[n_] := PowerMod[14,n,n]==0; Select[Range[30000], fQ] (* Vincenzo Librandi, Feb 04 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • PARI
    isA003591(n)=n>>=valuation(n,2);ispower(n,,&n);n==1||n==7 \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A003591(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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//7**i).bit_length() for i in range(integer_log(x,7)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(14*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - Peter Bala, Mar 18 2019
Sum_{n>=1} 1/a(n) = (2*7)/((2-1)*(7-1)) = 7/3. - Amiram Eldar, Sep 22 2020
a(n) ~ exp(sqrt(2*log(2)*log(7)*n)) / sqrt(14). - Vaclav Kotesovec, Sep 22 2020
a(n) = 2^A025637(n) *7^A025664(n). - R. J. Mathar, Jul 06 2025

A025693 Index of 2^n within sequence of numbers of form 2^i*7^j.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26, 30, 35, 40, 45, 51, 57, 64, 71, 78, 86, 94, 102, 111, 120, 129, 139, 149, 159, 170, 181, 193, 205, 217, 230, 243, 256, 270, 284, 298, 313, 328, 343, 359, 375, 392, 409, 426, 444, 462, 480, 499, 518, 537, 557, 577, 597, 618, 639, 661, 683
Offset: 0

Views

Author

Keywords

Comments

Positions of zeros in A025664. - R. J. Mathar, Jul 06 2025

Crossrefs

Cf. A003591.

Programs

  • PARI
    a(n)=my(N=7<Charles R Greathouse IV, Jun 28 2011
    
  • PARI
    a(n)=my(N=1); n+1+sum(i=1, n, logint(N<<=1, 7)); \\ Charles R Greathouse IV, Jan 11 2018
    
  • PARI
    first(n)=my(s, N=1/2); vector(n+1, i, s+=logint(N<<=1, 7)+1) \\ Charles R Greathouse IV, Jan 11 2018

Formula

a(n) ~ kn^2 + O(n) with k = log(7)/log(2) - log(7)^2/log(2)^2. - Charles R Greathouse IV, Jun 28 2011

Extensions

An incorrect g.f. was deleted by N. J. A. Sloane, Sep 16 2009
Showing 1-2 of 2 results.