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.

User: Jerry Metzger

Jerry Metzger's wiki page.

Jerry Metzger has authored 5 sequences.

A177356 a(n) is the index of the first 0 term in the rumor sequence with initial 0th term 1 and parameters b = 2 and n.

Original entry on oeis.org

1, 2, 5, 10, 3, 18, 7, 24, 23, 22, 13, 4, 19, 18, 9, 6, 15, 374, 13, 12, 11, 370, 369, 32, 367, 366, 5, 28, 363, 8, 361, 360, 37, 358, 21, 356, 355, 354, 353, 16, 351, 100, 349, 98, 347, 346, 95, 344, 93, 92, 91, 340, 89, 10, 15, 336, 31, 6, 333, 82, 331, 80, 25, 328, 327, 326
Offset: 1

Author

Jerry Metzger, Dec 10 2010

Keywords

Comments

A rumor sequence (running modulus recurrence sequence) is defined as follows: fix integer parameters b > 1 and n > 0. Set z[0] = any integer, and, for k > 0, define z[k] to be the least nonnegative residue of b*z[k-1] modulo (k+n). The rumor sequence conjecture states that all such rumor sequences are eventually 0.

Examples

			For n = 15, the z-sequence terms are 1, 2, 4, 8, 16, 12, 3, 6, 12, 0, so a(15) = 9; that is, z[0] = 1, z[1] = 2, z[2] = 4, ..., z[8] = 12, and z[9] = 0. [Edited by _Petros Hadjicostas_, Dec 13 2019]
		

Crossrefs

Programs

  • Mathematica
    For[n=1,n<50,n++,k=0;Clear[z];z[0]=1;z[k_]:=z[k]=Mod[2z[k-1],k+n];
    While[z[k]>0,k++];Print[k];]

Formula

a(n) = inf{m > 0 | z[0] = 1, z[m] = 0, and z[k] = (2*z[k-1] mod (k + n)) for k = 1..m}. - Petros Hadjicostas, Dec 13 2019

Extensions

More terms from Petros Hadjicostas, Dec 13 2019

A125849 a(n) = Sum_{m=1..n-1} floor(m(n-2)/2)^2.

Original entry on oeis.org

0, 0, 0, 1, 14, 62, 220, 547, 1260, 2444, 4560, 7685, 12650, 19466, 29484, 42567, 60760, 83672, 114240, 151689, 200070, 258070, 331100, 417131, 523204, 646372, 795600, 966797, 1171170, 1403234, 1676780, 1984655, 2343600, 2744496, 3207424
Offset: 0

Author

Jerry Metzger, Jul 09 2008

Keywords

Programs

  • Maple
    for n from 0 to 15 do add( floor(m*(n-2)/2)^2,m=1..n-1) ; print(n,%) ; od: # R. J. Mathar
  • Mathematica
    f[n_] := Sum[ Floor[m (n - 2)/2]^2, {m, n - 1}]; Table[ f@n, {n, 0, 35}] (* Robert G. Wilson v, Aug 03 2008 *)

Formula

G.f.: (x^3*(x^6+18*x^5+35*x^4+62*x^3+31*x^2+12*x+1))/((x+1)^4*(x-1)^6). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 28 2009

Extensions

More terms from Robert G. Wilson v, Aug 03 2008

A007844 Least positive integer k for which 3^n divides k!.

Original entry on oeis.org

1, 3, 6, 9, 9, 12, 15, 18, 18, 21, 24, 27, 27, 27, 30, 33, 36, 36, 39, 42, 45, 45, 48, 51, 54, 54, 54, 57, 60, 63, 63, 66, 69, 72, 72, 75, 78, 81, 81, 81, 81, 84, 87, 90, 90, 93, 96, 99, 99, 102, 105, 108, 108, 108, 111, 114, 117, 117, 120, 123, 126, 126, 129, 132, 135, 135, 135
Offset: 0

Author

Bruce Dearden and Jerry Metzger, R. Muller

Keywords

Comments

It appears than for n>0, a(n) is divisible by 3, and that the resulting sequence a(n)/3 is A120503 (checked up to n=1000). - Michel Marcus, Aug 19 2013. [This is true: see A007843 for the idea of the proof. - M. F. Hasler, Dec 27 2019]
Also least positive integer k for which 6^n divides k!. - Michel Marcus, Aug 20 2013

References

  • H. Ibstedt, Smarandache Primitive Numbers, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 216-229.

Crossrefs

Cf. A007843 (analog for 2), A007845 (analog for 5).
Cf. A120503 (Meta-Fibonacci, k = 3).

Programs

  • Mathematica
    Array[Block[{k = 1}, While[Mod[k!, 3^#] != 0, k++]; k] &, 67, 0] (* Michael De Vlieger, Dec 29 2019 *)
  • PARI
    a(n) = {k = 1; while (valuation(k!, 3) < n, k++); k;} \\ Michel Marcus, Aug 19 2013
    
  • PARI
    apply( A007844(n)={my(s=sumdigits(n*=2,3)\2); n-=n%3; while(s>0, s-=valuation(n+=3,3)); n+!n}, [0..99]) \\ M. F. Hasler, Dec 27 2019

Formula

a(n) = 3*A120503(n) for n > 0, cf. A007843. - M. F. Hasler, Dec 27 2019

A007845 Least positive integer k for which 5^n divides k!.

Original entry on oeis.org

1, 5, 10, 15, 20, 25, 25, 30, 35, 40, 45, 50, 50, 55, 60, 65, 70, 75, 75, 80, 85, 90, 95, 100, 100, 105, 110, 115, 120, 125, 125, 125, 130, 135, 140, 145, 150, 150, 155, 160, 165, 170, 175, 175, 180, 185, 190, 195, 200, 200, 205, 210, 215, 220, 225, 225, 230, 235, 240, 245
Offset: 0

Author

Bruce Dearden and Jerry Metzger

Keywords

Comments

Also the smallest factorial having at least n trailing zeros. - Jud McCranie, Oct 05 2010
a(n) ~ 4n, a(n) > 4n. Every positive multiple of 5 occurs as much as the exponent of 5 in the prime factorization. - David A. Corneth, Jul 12 2016
Least k such that A027868(k) >= n. - Robert Israel, Jul 12 2016
See A007843 and A007844 for the analog for 2 and 3 instead of 5. - M. F. Hasler, Dec 27 2019

References

  • H. Ibstedt, Smarandache Primitive Numbers, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 216-229.

Crossrefs

Programs

  • Maple
    1, seq(t $ padic:-ordp(t,5), t=5..1000, 5); # Robert Israel, Jul 12 2016
  • Mathematica
    lpi[n_]:=Module[{k=1,n5=5^n},While[!Divisible[k!,n5],k++];k]; Array[ lpi,60,0] (* Harvey P. Dale, Jun 19 2012 *)
  • PARI
    a(n) = {k = 1; while (valuation(k!, 5) < n, k++); k;} \\ Michel Marcus, Aug 19 2013
    
  • PARI
    a(n) = {my(ck = 4 * n, k = 5 * floor(ck/5), t = 0); if(ck > 0, t = sum(i = 1, logint(ck,5),ck\=5)); while(t < n, k+=5; t+=valuation(k,5));max(1,k)} \\ David A. Corneth, Jul 12 2016

Formula

a(n) = 5*A228297(n) for n > 0: see A007843. - M. F. Hasler, Dec 27 2019

A007843 Least positive integer k for which 2^n divides k!.

Original entry on oeis.org

1, 2, 4, 4, 6, 8, 8, 8, 10, 12, 12, 14, 16, 16, 16, 16, 18, 20, 20, 22, 24, 24, 24, 26, 28, 28, 30, 32, 32, 32, 32, 32, 34, 36, 36, 38, 40, 40, 40, 42, 44, 44, 46, 48, 48, 48, 48, 50, 52, 52, 54, 56, 56, 56, 58, 60, 60, 62, 64, 64, 64, 64, 64, 64, 66, 68, 68, 70, 72, 72, 72, 74, 76, 76, 78
Offset: 0

Author

Bruce Dearden and Jerry Metzger; R. Muller

Keywords

Comments

Obtained by writing every natural number n k times where 2^k divides n but 2^(k+1) does not divide n. - Amarnath Murthy, Aug 22 2002
An interval of the form (A007814(k!)-A007814(k), A007814(k!)] contains n >= 1 iff k = a(n). - Vladimir Shevelev, Mar 19 2012
It appears than for n > 0, a(n) is divisible by 2, and that the resulting sequence a(n)/2 is A046699 (ignoring first term, this is the Meta-Fibonacci sequence for s=0). - Michel Marcus, Aug 19 2013
The last part is proved in the Kullmann & Zhao preprint, Thm. 3.16. The first statement is obvious: to get a larger power of two in k!, k > 1 must be increased by 2, else the factor is odd and doesn't increase the 2-valuation of k!. The other part also follows from the comment in A046699: "n occurs A001511(n) times", where A001511 = A007814 + 1, A007814 = the number of powers of 2 in k. - M. F. Hasler, Dec 27 2019

References

  • H. Ibstedt, Smarandache Primitive Numbers, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 216-229.

Programs

  • Maple
    with(numtheory): ans := [ ]: p := ithprime(1): t0 := 1/p: for n from 0 to 50 do t0 := t0*p: t1 := 1: i := 1: while t1 mod t0 <> 0 do i := i+1: t1 := t1*i: od: ans := [ op(ans),i ]: od: ans;
    # Alternative:
    N:= 1000: # to get a(0) to a(N)
    A:= Array(0..N):
    A[0]:= 1:
    A[1]:= 2:
    B[2]:= 1:
    for k from 4 by 2 do
      B[k]:= B[k-2] + padic:-ordp(k,2);
      A[B[k-2]+1..min(N,B[k])]:= k;
      if B[k] >= N then break fi;
    od:
    seq(A[i],i=0..N); # Robert Israel, Dec 07 2015
  • Mathematica
    a[n_] := (k=0; While[Mod[++k!, 2^n] > 0]; k); Table[a[n], {n, 0, 74}] (* Jean-François Alcover, Dec 08 2011 *)
    Join[{1},Module[{nn=100,f},f=Table[{x!,x},{x,0,nn}];Table[ SelectFirst[ f,Divisible[#[[1]],2^n]&],{n,80}]][[All,2]]] (* Harvey P. Dale, Nov 20 2021 *)
  • PARI
    a(n)=if(n<0,0,s=1; while(s!%(2^n)>0,s++); s)
    
  • PARI
    a(n) = {k = 1; while (valuation(k!, 2) < n, k++); k;} \\ Michel Marcus, Aug 19 2013
    
  • PARI
    apply( A007843(n)={for(k=1,oo,(n-=valuation(k,2))>0||return(k))}, [0..99]) \\ This idea can also be used to compute most efficiently a vector a(0..N). - M. F. Hasler, Dec 27 2019
    
  • Python
    from itertools import count
    def A007843(n):
        c = 0
        for k in count(1):
            c += (~k&k-1).bit_length()
            if c >= n:
                return k # Chai Wah Wu, Jul 08 2022

Formula

a(n) = A002034(2^n). For n>1, it appears that a(n+1) = a(n)+2 if n is in A005187. - Benoit Cloitre, Sep 01 2002
G.f.: 1 + 2*(x/(1-x))*Product_{k >= 1} (1+x^(2^k-1)). - Wadim Zudilin, Dec 07 2015
a(n) = 2*A046699(n) for n > 0. - Michel Marcus and M. F. Hasler, Dec 27 2019
a(2^i + r) = 2^i + a(r+1) for 0 <= r <= 2^i-2, and a(2^i + r) = 2^(i+1) for r = 2^i-1. - Kevin Ryde, Aug 06 2022