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

A191610 Possible number of trailing zeros in k!.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 86, 87, 88, 89, 90, 93, 94, 95, 96, 97, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 111, 112, 113, 114, 115, 117, 118, 119, 120, 121, 124, 125, 126, 127, 128, 130, 131, 132, 133, 134, 136
Offset: 1

Views

Author

Keywords

Comments

Equivalently, possible values of 10-adic valuation of k!. - Joerg Arndt, Sep 21 2020

Examples

			3 is a term because 15! = 1307674368000 has 3 trailing 0's.
5 is not a term because 24! has 4 trailing 0's, but 25! has 6 trailing 0's.
		

Crossrefs

Cf. A027868, A000351, A055457 (first differences).
Complement of A000966.

Programs

  • Haskell
    a191610 1 = 0
    a191610 n = sum $ takeWhile (> 0) $ map ((n - 1) `div`) a000351_list
    -- Reinhard Zumkeller, Oct 31 2012
    
  • Mathematica
    zOF[n_Integer?Positive]:=Module[{maxpow=0},While[5^maxpow<=n,maxpow++];Plus@@Table[ Quotient[n,5^i],{i,maxpow-1}]]; Attributes[zOF]={Listable}; zOF[Range[1000]]//Union (* Harvey P. Dale, Dec 06 2023 *)
    Table[Sum[Floor[(n - 1)/5^k], {k, 0, Floor[Log[5, n]]}], {n, 1, 200}] (* Clark Kimberling, Feb 17 2025 *)
  • Python
    # requires Python 3.2 and higher
    from itertools import accumulate
    from sympy import multiplicity
    A191610 = [0]+list(accumulate(multiplicity(5,n) for n in range(5,10**3,5)))
    # Chai Wah Wu, Sep 05 2014

Formula

a(n) ~ 5*n/4. - Vaclav Kotesovec, Sep 21 2020
G.f.: 1/(1-x) * Sum_{k>=0} x^(5^k)/(1-x^5^k). - Joerg Arndt, Sep 21 2020
a(n) = Sum_{k>=0} floor((n-1)/5^k). - Clark Kimberling, Feb 17 2025

A380662 Numbers m such that Sum_{k>=0} floor(m/5^k) is prime.

Original entry on oeis.org

2, 3, 6, 11, 16, 25, 30, 34, 35, 39, 44, 49, 58, 68, 73, 79, 82, 84, 87, 89, 92, 103, 106, 111, 113, 121, 123, 126, 131, 146, 154, 155, 159, 160, 170, 183, 188, 193, 202, 207, 212, 217, 219, 224, 226, 228, 236, 248, 251, 266, 271, 279, 280, 284, 289, 295
Offset: 1

Views

Author

Clark Kimberling, Feb 19 2025

Keywords

Examples

			floor(16/1) + floor(16/5) = 19, so 16 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Sum[Floor[(n-1)/5^k], {k, 0, Floor[Log[5, n]]}]  (* A191610 *)
    Select[Range[400], PrimeQ[f[#]] &]

A381897 a(n) = least integer m >= 2 such that prime(n) is a sum of the form Sum_{k>=0} floor(h/m^k) for some integer h >= 1.

Original entry on oeis.org

3, 2, 3, 2, 2, 3, 3, 2, 2, 4, 2, 4, 2, 4, 2, 2, 3, 3, 2, 2, 2, 2, 5, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 4, 3, 3, 3, 2, 3, 2, 4, 3, 3, 2, 3, 2, 2, 2, 3, 2, 4, 2, 3, 3, 3, 2, 4, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2, 4, 2, 4
Offset: 1

Views

Author

Clark Kimberling, Mar 09 2025

Keywords

Examples

			a(10) = 4 because 4 is the least m such that prime(10) is a sum of the form Sum_{k>=0} [h/m^k] for some h >= 1; that sum is 29 = [23/1] + [23/4] + [23/16], where [ ] = floor.
		

Crossrefs

Programs

  • Mathematica
    f[h_, m_] := Sum[Floor[h/m^k], {k, 0, Floor[Log[m, h]]}]
    {rng, n} = {1000, 6};
    Table[u[m] = Select[Range[rng], PrimeQ[f[#, m]] &], {m, 2, n}];
    tmp = SortBy[Map[#[[1]] &, GatherBy[Flatten[Table[
           Transpose[{ConstantArray[m, Length[u[m]]],
             Map[PrimePi[f[#, m]] &, u[m]]}], {m, 2, n}],1], #[[2]] &]], #[[2]] &];
    tmp = Map[#[[1]] &, Take[tmp, Position[Differences[Map[#[[2]] &, tmp]], x_ /; x != 1, 1, 1][[1]][[1]]]]
    (* Peter J. C. Moses, Feb 19 2025 *)

Formula

a(n) = A382278(prime(n)). - Pontus von Brömssen, Mar 22 2025
Showing 1-3 of 3 results.