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-8 of 8 results.

A112765 Exponent of highest power of 5 dividing n. Or, 5-adic valuation of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 18 2005

Keywords

Comments

A027868 gives partial sums.
This is also the 5-adic valuation of Fibonacci(n). See Lengyel link. - Michel Marcus, May 06 2017

Crossrefs

Cf. A343251, A000351 (positions of records, greedy inverse).

Programs

  • Haskell
    a112765 n = fives n 0 where
       fives n e | r > 0     = e
                 | otherwise = fives n' (e + 1) where (n',r) = divMod n 5
    -- Reinhard Zumkeller, Apr 08 2011
    
  • Maple
    A112765 := proc(n)
        padic[ordp](n,5) ;
    end proc: # R. J. Mathar, Jul 12 2016
  • Mathematica
    a[n_] := IntegerExponent[n, 5]; Array[a, 105] (* Jean-François Alcover, Jan 25 2018 *)
  • PARI
    A112765(n)=valuation(n,5); /* Joerg Arndt, Apr 08 2011 */
    
  • Python
    def a(n):
        k = 0
        while n > 0 and n%5 == 0: n //= 5; k += 1
        return k
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Aug 06 2021

Formula

Totally additive with a(p) = 1 if p = 5, 0 otherwise.
From Hieronymus Fischer, Jun 08 2012: (Start)
With m = floor(log_5(n)), frac(x) = x-floor(x):
a(n) = Sum_{j=1..m} (1 - ceiling(frac(n/5^j))).
a(n) = m + Sum_{j=1..m} (floor(-frac(n/5^j))).
a(n) = A027868(n) - A027868(n-1).
G.f.: Sum_{j>0} x^5^j/(1-x^5^j). (End)
a(5n) = A055457(n). - R. J. Mathar, Jul 17 2012
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/4. - Amiram Eldar, Feb 14 2021
a(n) = 5*Sum_{j=1..floor(log(n)/log(5))} frac(binomial(n, 5^j)*5^(j-1)/n). - Dario T. de Castro, Jul 10 2022

A003593 Numbers of the form 3^i*5^j with i, j >= 0.

Original entry on oeis.org

1, 3, 5, 9, 15, 25, 27, 45, 75, 81, 125, 135, 225, 243, 375, 405, 625, 675, 729, 1125, 1215, 1875, 2025, 2187, 3125, 3375, 3645, 5625, 6075, 6561, 9375, 10125, 10935, 15625, 16875, 18225, 19683, 28125, 30375, 32805, 46875, 50625, 54675, 59049
Offset: 1

Views

Author

Keywords

Comments

Odd 5-smooth numbers (A051037). - Reinhard Zumkeller, Sep 18 2005

Crossrefs

Cf. A033849, A112751-A112756, A143202, A022337 (list of j), A022336(list of i).
Cf. A264997 (partitions into), see also A264998. Cf. A108347 (odd 7-smooth).

Programs

  • GAP
    Filtered([1..60000],n->PowerMod(15,n,n)=0); # Muniru A Asiru, Mar 19 2019
    
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003593 n = a003593_list !! (n-1)
    a003593_list = f (singleton 1) where
       f s = m : f (insert (3*m) $ insert (5*m) s') where
         (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Sep 13 2011
    
  • Magma
    [n: n in [1..60000] | PrimeDivisors(n) subset [3,5]]; // Bruno Berselli, Sep 24 2012
    
  • Maple
    isA003593 := proc(n)
        if n = 1 then
            true;
        else
            return (numtheory[factorset](n) minus {3, 5} = {} );
        end if;
    end proc:
    A003593 := proc(n)
        option remember;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA003593(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A003593(n),n=1..30) ; # R. J. Mathar, Aug 04 2016
  • Mathematica
    fQ[n_] := PowerMod[15, n, n] == 0; Select[Range[60000], fQ] (* Bruno Berselli, Sep 24 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(5),N=5^n;while(N<=lim,listput(v,N);N*=3));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • PARI
    is(n)=n==3^valuation(n,3)*5^valuation(n,5) \\ Charles R Greathouse IV, Apr 23 2013
    
  • Python
    from sympy import integer_log
    def A003593(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(integer_log(x//5**i,3)[0]+1 for i in range(integer_log(x,5)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Oct 22 2024

Formula

a(n) ~ 1/sqrt(15)*exp(sqrt(2*log(3)*log(5)*n)) asymptotically. - Benoit Cloitre, Jan 22 2002
The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(15*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) = (3*5)/((3-1)*(5-1)) = 15/8. - Amiram Eldar, Sep 22 2020

A022336 Exponent of 3 (value of i) in n-th number of form 3^i*5^j.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 2, 1, 4, 0, 3, 2, 5, 1, 4, 0, 3, 6, 2, 5, 1, 4, 7, 0, 3, 6, 2, 5, 8, 1, 4, 7, 0, 3, 6, 9, 2, 5, 8, 1, 4, 7, 10, 0, 3, 6, 9, 2, 5, 8, 11, 1, 4, 7, 10, 0, 3, 6, 9, 12, 2, 5, 8, 11, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 2, 5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2, 5, 8, 11, 14, 1, 4, 7
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    s = {}; m = 12; Do[n = 5^k; While[n <= 5^m, AppendTo[s, n]; n *= 3], {k, 0, m}]; IntegerExponent[#, 3] & /@ Union[s] (* Amiram Eldar, Feb 06 2020 *)

Formula

a(n) = A007949(A003593(n)) = A112754(n) - A022337(n). - Reinhard Zumkeller, Sep 18 2005

A112762 Exponent of 5 (value of k) in n-th number of the form 2^i*3^j*5^k.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 0, 0, 2, 1, 0, 1, 0, 2, 0, 1, 3, 0, 1, 0, 2, 1, 0, 1, 0, 2, 0, 2, 1, 0, 3, 0, 1, 0, 2, 1, 0, 1, 3, 0, 2, 1, 0, 2, 1, 0, 3, 0, 1, 0, 2, 4, 1, 0, 2, 1, 0, 3, 0, 2, 1, 0, 2, 1, 0, 3, 0, 1, 3, 0, 2, 1, 4, 1, 0, 2, 1, 0, 3, 0, 2, 1, 0, 2, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 18 2005

Keywords

Crossrefs

Programs

  • Mathematica
    IntegerExponent[#, 5] & /@ Select[Range[3000], Last @ Map[First, FactorInteger[#]] <= 5 &] (* Amiram Eldar, Feb 07 2020 *)

Formula

a(n) = A112765(A051037(n));
a(n) = A112759(n) - A112760(n) - A112761(n).

A112754 Total number of prime factors of n-th number of the form 3^i*5^j.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 3, 4, 4, 5, 4, 5, 4, 5, 6, 5, 6, 5, 6, 7, 5, 6, 7, 6, 7, 8, 6, 7, 8, 6, 7, 8, 9, 7, 8, 9, 7, 8, 9, 10, 7, 8, 9, 10, 8, 9, 10, 11, 8, 9, 10, 11, 8, 9, 10, 11, 12, 9, 10, 11, 12, 9, 10, 11, 12, 13, 9, 10, 11, 12, 13, 10, 11, 12, 13, 14, 10, 11, 12, 13, 14, 10, 11, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 18 2005

Keywords

Crossrefs

Programs

  • Mathematica
    s = {}; m = 12; Do[n = 5^k; While[n <= 5^m, AppendTo[s, n]; n *= 3], {k, 0, m}]; PrimeOmega[Union[s]] (* Amiram Eldar, Feb 06 2020 *)

Formula

a(n) = A001222(A003593(n)) = A022336(n) + A022337(n).

A112753 Number of distinct prime factors of n-th number of the form 3^i*5^j.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 18 2005

Keywords

Crossrefs

Programs

  • Mathematica
    With[{nn=120},Take[PrimeNu/@Union[Flatten[{3^#[[1]] 5^#[[2]],5^#[[1]] 3^#[[2]]}&/@Tuples[Range[0,nn],2]]],nn]] (* Harvey P. Dale, Nov 29 2013 *)

Formula

a(n) = A001221(A003593(n)) = 2 - 0^A022336(n) + 0^A022337(n);
a(n) <= 2.

A356625 After n iterations of the "Square Multiscale" substitution, the largest tiles have side length 3^t / 5^f; a(n) = f (A356624 gives corresponding t's).

Original entry on oeis.org

0, 1, 2, 3, 1, 4, 2, 5, 3, 6, 4, 2, 7, 5, 3, 8, 6, 4, 9, 7, 5, 3, 10, 8, 6, 4, 11, 9, 7, 5, 12, 10, 8, 6, 4, 13, 11, 9, 7, 5, 14, 12, 10, 8, 6, 15, 13, 11, 9, 7, 5, 16, 14, 12, 10, 8, 6, 17, 15, 13, 11, 9, 7, 18, 16, 14, 12, 10, 8, 6, 19, 17, 15, 13, 11, 9, 7
Offset: 0

Views

Author

Rémy Sigrist, Aug 17 2022

Keywords

Comments

See A329919 for further details about the "Square Multiscale" substitution.

Examples

			The first terms, alongside the corresponding side lengths, are:
  n   a(n)  Side length
  --  ----  -----------
   0     0            1
   1     1          3/5
   2     2         9/25
   3     3       27/125
   4     1          1/5
   5     4       81/625
   6     2         3/25
   7     5     243/3125
   8     3        9/125
   9     6    729/15625
  10     4       27/625
		

Crossrefs

Programs

  • PARI
    { sc = [1]; for (n=0, 76, s = vecmax(sc); print1 (-valuation(s,5)", "); sc = setunion(setminus(sc,[s]), Set([3*s/5, s/5]))) }

Formula

5^a(n) >= 3^A356624(n).

A173863 Square root of A172545(n).

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 0, 3, 1, 2, 0, 3, 1, 4, 2, 0, 3, 1, 4, 2, 0, 3, 1, 4, 2, 0, 5, 3, 1, 4, 2, 0, 5, 3, 1, 4, 2, 0, 5, 3, 1, 6, 4, 2, 0, 5, 3, 1, 6, 4, 2, 0, 5, 3, 1, 6, 4, 2, 0, 5, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 6, 4, 2, 0, 7, 5, 3, 1, 8, 6, 4, 2, 0, 7, 5, 3, 1, 8, 6, 4, 2, 0
Offset: 0

Views

Author

Paul Curtz, Nov 26 2010

Keywords

Crossrefs

A054073(n+2). Essentially A022337.
Showing 1-8 of 8 results.