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.

Previous Showing 41-50 of 53 results. Next

A276624 The infinite trunk of ternary beanstalk with reversed subsections.

Original entry on oeis.org

0, 2, 8, 4, 26, 20, 16, 12, 10, 80, 72, 68, 62, 56, 52, 46, 42, 38, 34, 30, 28, 242, 232, 224, 216, 212, 204, 198, 194, 188, 180, 176, 170, 164, 160, 152, 144, 140, 134, 126, 122, 116, 110, 106, 100, 96, 92, 88, 84, 82, 728, 716, 706, 698, 688, 680, 672, 664, 656, 648, 644, 634, 626, 618, 610, 602, 594, 590, 582, 576, 572
Offset: 0

Views

Author

Antti Karttunen, Sep 11 2016

Keywords

Comments

See A276623.

Crossrefs

Programs

  • Scheme
    (definec (A276624 n) (cond ((zero? n) n) ((= n 1) 2) (else (let ((maybe_next (* 2 (A054861 (A276624 (- n 1)))))) (if (not (= 1 (A053735 (+ 1 maybe_next)))) maybe_next (+ -1 (A000244 (+ 1 (A081604 (+ 1 maybe_next))))))))))

Formula

a(0) = 0; a(1) = 2; for n > 1, if 2*A054861(a(n-1))+1 is not a power of 3, then a(n) = 2*A054861(a(n-1)), otherwise a(n) = A000244(1+A081604(1+2*A054861(a(n-1)))) - 1.

A344853 a(n) = n minus (sum of digits of n in base 3).

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 4, 4, 4, 8, 8, 8, 10, 10, 10, 12, 12, 12, 16, 16, 16, 18, 18, 18, 20, 20, 20, 26, 26, 26, 28, 28, 28, 30, 30, 30, 34, 34, 34, 36, 36, 36, 38, 38, 38, 42, 42, 42, 44, 44, 44, 46, 46, 46, 52, 52, 52, 54, 54, 54, 56, 56, 56, 60, 60, 60, 62, 62, 62
Offset: 0

Views

Author

Thomas König, May 30 2021

Keywords

Comments

All terms are even.
In all sequences of the form f(n) = n minus (sum of digits of n in base b), every term appears b times consecutively. Here b = 3, hence terms are entries of A346502 repeated 3 times. - Bernard Schott, Jul 21 2021

Examples

			a(20) = 20 - (2 + 0 + 2) = 16 because 20 is written as 202 in base 3.
		

Crossrefs

Cf. A011371 (in base 2), A066568 (in base 10).

Programs

  • Mathematica
    a[n_] := n - Plus @@ IntegerDigits[n, 3]; Array[a, 70, 0] (* Amiram Eldar, May 30 2021 *)
  • PARI
    a(n) = n - sumdigits(n, 3); \\ Michel Marcus, Jul 11 2021

Formula

a(n) = n - A053735(n).
a(n) = 2 * A054861(n).
a(n) = 2 * A004128(floor(n/3)).
a(3*n) = a(3*n+1) = a(3*n+2).

A376410 Number of integers whose arithmetic derivative (A003415) is equal to n!, the n-th factorial.

Original entry on oeis.org

0, 1, 4, 13, 40, 186, 952, 5533, 38719, 346207, 3130816, 34444968, 382437431, 4637235152
Offset: 2

Views

Author

Antti Karttunen, Nov 06 2024

Keywords

Comments

For 1! = 1, there are an infinite number of integers k for which A003415(k) = 1 (namely, all the primes), therefore the starting offset is 2.
Like with A351029, also here most of the solutions seem to be squarefree semiprimes, counted by A062311.
Terms a(12)..a(15) were obtained by summing the corresponding terms of A062311 and A377986.

Crossrefs

Programs

  • PARI
    \\ Slow program, for computing just a few terms:
    A002620(n) = ((n^2)>>2);
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    A376410(n) = { my(g=n!); sum(k=1,A002620(g),A003415(k)==g); };
    
  • PARI
    A376410(n) = AntiDeriv(n!);
    AntiDeriv(n,startvlen=1,solsfilename="") = { my(v = vector(startvlen,i,2), ip = #v, r, c=0); while(1, r = A003415vrl(v,n); if(0==r, ip--, if(r > 1, c++; if(solsfilename!="", write(solsfilename, r*factorback(v)))); ip = #v); if(0==ip, v = vector(1+#v,i,2); ip = #v; if(A003415vec(v) > n, return(c)), v[ip] = nextprime(1+v[ip]); for(i=1+ip, #v, v[i]=v[i-1]))); };
    A003415vec(tv) = { my(n=factorback(tv), s=0, m=1, spf); for(i=1,#tv,spf = tv[i]; n /= spf; s += m*n; m *= spf); (s); }; \\ Compute Arithmetic derivative from the vector of primes.
    A003415vrl(pv,lim) = { my(n=factorback(pv), x=lim-n, s=0, m=1, spf, u=n); for(i=1,#pv,spf = pv[i]; u /= spf; s += m*u; m *= spf); if(((x/s)
    				

Formula

a(n) = A099302(A000142(n)).
a(n) = Sum_{k=1..A002620(n!)} [A003415(k) = n!], where [ ] is the Iverson bracket.
a(n) = A062311(n) + A377986(n).

A090621 Exponent of highest power of 16 dividing n!.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			a(10)=2 since 10! = 3628800 = 16^2 * 14175.
		

Crossrefs

Programs

Formula

a(n) = A090622(n, 16) = floor(A011371(n)/4) = floor(A090616(n)/2) = floor((floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ...)/4). Almost n/4.

A118381 Largest 3-smooth number dividing n!.

Original entry on oeis.org

1, 2, 6, 24, 24, 144, 144, 1152, 10368, 20736, 20736, 248832, 248832, 497664, 1492992, 23887872, 23887872, 429981696, 429981696, 1719926784, 5159780352, 10319560704, 10319560704, 247669456896, 247669456896, 495338913792, 13374150672384, 53496602689536, 53496602689536
Offset: 1

Views

Author

Reinhard Zumkeller, May 16 2006

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_, b_] := Sum[IntegerExponent[k, b], {k, 1, n}]; a[n_] := 2^s[n, 2] * 3^s[n, 3]; Array[a, 30] (* Amiram Eldar, Jan 29 2020 *)

Formula

a(n) = A060818(n) * A060828(n).

Extensions

More terms from Amiram Eldar, Jan 29 2020

A127427 a(n) = v_3( (6n)! ) - v_3( (3n)! ), where v_3(N) is the 3-adic valuation A007949(N).

Original entry on oeis.org

0, 1, 3, 4, 5, 8, 9, 10, 12, 13, 14, 16, 17, 18, 22, 23, 24, 26, 27, 28, 30, 31, 32, 35, 36, 37, 39, 40, 41, 43, 44, 45, 48, 49, 50, 52, 53, 54, 56, 57, 58, 63, 64, 65, 67, 68, 69, 71, 72, 73, 76, 77, 78, 80, 81, 82, 84, 85, 86, 89, 90, 91, 93, 94, 95, 97, 98, 99, 103, 104, 105, 107
Offset: 0

Views

Author

N. J. A. Sloane, Apr 02 2007

Keywords

Crossrefs

Essentially partial sums of A127427.

Programs

  • Mathematica
    s[n_] := Plus @@ IntegerDigits[n, 3]; a[n_] := (3*n + s[3*n] - s[6*n])/2; Array[a, 100, 0] (* Amiram Eldar, Feb 21 2021 *)
  • PARI
    a(n) = valuation((6*n)!, 3) - valuation((3*n)!, 3); \\ Michel Marcus, Jul 29 2017

Formula

a(n) - n = a( [(n+1)/3] ).
a(n) = (3*n + A053735(n) - A053735(6*n))/2. - Amiram Eldar, Feb 21 2021

A088244 Number of 3-smooth divisors of n!.

Original entry on oeis.org

1, 1, 2, 4, 8, 8, 15, 15, 24, 40, 45, 45, 66, 66, 72, 84, 112, 112, 153, 153, 171, 190, 200, 200, 253, 253, 264, 336, 364, 364, 405, 405, 480, 512, 528, 528, 630, 630, 648, 684, 741, 741, 800, 800, 840, 924, 946, 946, 1081, 1081, 1104, 1152, 1200, 1200
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := ((1 + IntegerExponent[n!, 2])*(1 + IntegerExponent[n!, 3])); Array[a, 100, 0] (* Amiram Eldar, Aug 30 2019 *)

Formula

a(n) = A072078(A000142(n)).
a(n) = a(n-1) iff gcd(n,6) = 1.
a(n) = (A011371(n)+1)*(A054861(n)+1).

A089643 3^a(n) divides C(3n,n); 3-adic valuation of A005809.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jan 01 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[IntegerExponent[Binomial[3 n, n], 3], {n, 0, 104}] (* Michael De Vlieger, Jul 29 2017 *)
  • PARI
    a(n)=valuation(binomial(3*n,n),3)
    
  • Python
    from sympy import binomial
    def a007949(n): return 0 if n%3 else a007949(n//3) + 1
    def a(n): return a007949(binomial(3*n, n))
    print([a(n) for n in range(151)]) # Indranil Ghosh, Jul 29 2017

Formula

a(n) = A007949(A005809(n)). - Antti Karttunen, Jul 29 2017
a(n) = A054861(3*n) - A054861(2*n) - A054861(n). - David A. Corneth, Jul 29 2017
a(n) = A053735(2*n)/2. - Amiram Eldar, Feb 21 2021

A135710 Positive integers b such that more than one prime factor p of b attains the maximum of (p-1)*v_p(b) where v_p(b) is the valuation of b at p.

Original entry on oeis.org

12, 45, 80, 90, 144, 180, 189, 240, 360, 378, 448, 637, 720, 756, 945, 1274, 1344, 1512, 1625, 1728, 1890, 1911, 2025, 2240, 2548, 2673, 3024, 3185, 3250, 3780, 3822, 4032, 4050, 4875, 5096, 5346, 5733, 6048, 6125, 6370, 6400, 6500, 6517, 6720, 7007, 7560, 7644
Offset: 1

Views

Author

Noam D. Elkies, Nov 25 2007

Keywords

Comments

Given b, the number of trailing zeros at the end of the base-b representation of x! is asymptotic to x/M where M is the maximum over p|b of (p-1)*v_p(b).
Usually only one prime p attains the maximum and then the number is v_p(x!)/v_p(b) for all but finitely many x.
But for b=12,45,80,90,..., at least two v_p(x!) must be computed. For example: if b=12 then for x=2006 there are 998 trailing zeros due to v_3 but for x=2007 there are 999 due to v_2.

Examples

			For b=90 we have (p-1)*v_p(b) = 1, 4, 4 for p = 2, 3, 5 respectively so the maximum of 4 is attained twice (p=3 and p=5).
		

References

  • Eryk LIPKA, Automaticity of the sequence of the last nonzero digits of n! in a fixed base, Journal de Théorie des Nombres de Bordeaux 31 (2019), 283-291. [See Theorem 3.7 on page 290, and consider the complementary sequence.] - Jean-Paul Allouche and Don Reble, Oct 22 2020.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k; for k from 1+
         `if`(n=1, 1, a(n-1)) while (s-> nops(s)<2 or (l->
          l[-2] (p-1)*padic[ordp](k, p),
           s))))([numtheory[factorset](k)[]]) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Oct 23 2020
  • Mathematica
    F[n_] := Module[{f, p, v, vmax}, f = FactorInteger[n]; p = f[[All, 1]]; v = Table[ f[[i, 2]]*(p[[i]]-1), {i, 1, Length[p]}]; vmax = Max[v]; Sum[Boole[v[[i]] == vmax], {i, 1, Length[v]}]]; Reap[For[n = 1, n <= 6400, n++, If[F[n] > 1, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jan 09 2014, translated from PARI *)
  • PARI
    { F(n, f,p,v,vmax)= f=factor(n); p=f[,1]; v=vector(length(p),i,f[i,2]*(p[i]-1)); vmax=vecmax(v); sum(i=1,length(v),v[i]==vmax) } for(n=1,6400,if(F(n)>1,print(n)))

A175417 Exponent of 2 minus sum of all other exponents, in the prime power factorization of n!

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 1, 0, 3, 1, 1, 0, 1, 0, 0, -2, 2, 1, 0, -1, 0, -2, -2, -3, -1, -3, -3, -6, -5, -6, -7, -8, -3, -5, -5, -7, -7, -8, -8, -10, -8, -9, -10, -11, -10, -13, -13, -14, -11, -13, -14, -16, -15, -16, -18, -20, -18, -20, -20, -21, -21, -22, -22, -25, -19, -21, -22
Offset: 0

Views

Author

Zak Seidov, May 08 2010

Keywords

Comments

a(n)=0 for n={0,1,3,7,11,13,14,18,20}.

Examples

			a(20) = 0 because 20! = 2432902008176640000 = ((2^18)*(3^8)*(5^4)*(7^2)*(11^1)*(13^1)*(17^1)*(19^1)) and 18-(8+4+2+1+1+1+1) = 0.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,p,k;
          p:= 2: t:= add(floor(n/2^k),k=1..ilog2(n)):
          do
            p:= nextprime(p);
            if n < p then return t fi;
            t:= t - add(floor(n/p^k),k=1..ilog[p](n))
          od
    end proc:
    map(f, [$0..100]); # Robert Israel, Nov 10 2024
  • Mathematica
    Table[2*IntegerExponent[m!,2]-Total[Last/@FactorInteger[m! ]],{m,0,130}]

Formula

a(n)=2*A011371(n)-A022559(n).
Previous Showing 41-50 of 53 results. Next