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.

A102048 Exponent of A046021(n) (least inverse of Kempner function A002034) when written as a power of A006530(n) (largest prime dividing n), with a(1) = 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 5, 3, 2, 1, 5, 1, 2, 3, 12, 1, 7, 1, 4, 3, 2, 1, 10, 5, 2, 11, 4, 1, 7, 1, 27, 3, 2, 5, 16, 1, 2, 3, 9, 1, 6, 1, 4, 10, 2, 1, 22, 7, 11, 3, 4, 1, 24, 5, 9, 3, 2, 1, 14, 1, 2, 10, 58, 5, 6, 1, 4, 3, 11, 1, 33, 1, 2, 17, 4, 7, 6, 1, 19, 37, 2, 1, 13, 5, 2, 3, 8, 1, 21, 7, 4, 3, 2, 5
Offset: 1

Views

Author

Jonathan Sondow, Dec 26 2004

Keywords

Examples

			a(6) = 2 because A046021(6) = 9 = 3^2 = A006530(6)^2.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Factorial Factors, Section 4.4 in Concrete Mathematics, 2nd ed. Reading, MA: Addison-Wesley, pp. 111-115, 1994.

Crossrefs

Programs

  • Mathematica
    With[{p=First[Last[FactorInteger[n, FactorComplete->True]]]}, 1+Sum[Floor[(n-1)/p^k], {k, Floor[Log[n-1]/Log[p]]}]]
  • PARI
    A102048(n,p=A006530(n))=1+if(n>1,sum(k=1,logint(n-=1,p),n\p^k)) \\ M. F. Hasler, Nov 27 2018
    
  • Python
    from sympy import primefactors, integer_log
    def A102048(n):
        if n == 1: return 1
        p = max(primefactors(n))
        return 1+sum((n-1)//p**k for k in range(1,integer_log(n-1,p)[0]+1)) # Chai Wah Wu, Oct 17 2024

Formula

a(n) = log(A046021(n))/log(A006530(n)) for n > 1.
a(n) = 1 + Sum_{k=1..floor(log(n-1)/log(P))} floor((n-1)/P^k) for n > 1, where P = A006530(n) is the greatest prime factor of n.

A092232 Values of n corresponding to the incrementally largest values of the least inverse A046021 of the Kempner function A002034, i.e., A002034(A092233(n)) = n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 12, 16, 24, 27, 32, 48, 54, 64, 81, 96, 108, 128, 162, 192, 216, 243, 256, 324, 384, 432, 486, 512, 648, 729, 768, 864, 972, 1024, 1296, 1458, 1536, 1728, 1944, 2048, 2592, 2916, 3072, 3456, 3888, 4096, 5184, 5832, 6144, 6561, 6912
Offset: 1

Views

Author

Eric W. Weisstein, Feb 25 2004

Keywords

Crossrefs

Extensions

Extended by Eric W. Weisstein using an algorithm due to Jonathan Sondow, Mar 01 2004

A092233 Incrementally largest values of the least inverse A046021 of the Kempner function A002034.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 32, 243, 4096, 59049, 177147, 134217728, 31381059609, 282429536481, 288230376151711744, 450283905890997363, 8862938119652501095929, 2153693963075557766310747
Offset: 1

Views

Author

Eric W. Weisstein, Feb 25 2004

Keywords

Crossrefs

Extensions

Extended by Eric W. Weisstein using an algorithm due to Jonathan Sondow, Mar 01 2004

A046022 Primes together with 1 and 4.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 1

Views

Author

Keywords

Comments

Also the numbers which are incrementally largest values of A002034. - validated by Franklin T. Adams-Watters, Jul 13 2012
Solutions to A000005(x) + A000010(x) - x - 1 = 0. - Labos Elemer, Aug 23 2001
Also numbers m such that m, phi(m) and tau(m) form an integer triangle, where phi=A000010 is the totient and tau=A000005 the number of divisors (see also A084820). - Reinhard Zumkeller, Jun 04 2003
Terms > 1 are n such that n does not divide (n-1)!. - Benoit Cloitre, Nov 12 2003
Terms > 1 are the sum of their prime factors; 4 (= 2+2) is the only such composite number. - Stuart Orford (sjorford(AT)yahoo.co.uk), Aug 04 2005
From Jonathan Vos Post, Aug 23 2010, Robert G. Wilson v, Aug 25 2010, proof by D. S. McNeil, Aug 29 2010: (Start)
Also the numbers n which divide A001414(n), or equivalently divide A075254(n). Proof:
Theorem: for a multiset of m >= 2 integers a_i, each a_i >= 2, Product_{i=1..m} a_i >= Sum_{i=1..m} a_i, with equality only at (a_1,a_2) = (2,2).
Lemma: For integers x,y >= 2, if x > 2 or y > 2, x*y > x + y. This follows from distributing (x-1)*(y-1) > 1.
[Proof of the theorem by induction on m:
first consider m=2. We have equality at (2,2) and for any product(a_i) > 4 there is some a_i > 2, so the lemma gives a_1*a_2 > a_1+a_2.
Then the induction m->m+1: Product_{i=1..m+1} a_i = a_(m+1)*Product_{i=1..m} a_i >= a_(m+1) * Sum_{i=1..m} a_i.
Since a_(m+1) >= 2 and the sum >= 4, the lemma applies, and we find a_(m+1) * Sum+{i=1..m} a_i > a_(m+1) + Sum_{i=1..m} a_i = Sum_{i=1..m+1} a_i and thus Product_{i=1..m+1} a_i > Sum_{i=1..m+1} a_i, QED.]
For composite n > 4, applying the theorem to the multiset of prime factors with multiplicity yields n > sopfr(n), so there are no composite numbers greater than 4 such that they divide sopfr(n).
(End)
Numbers k such that the k-th Fibonacci number is relatively prime to all smaller Fibonacci numbers. - Charles R Greathouse IV, Jul 13 2012
Numbers k such that (-1)^k*floor(d(k)*(-1)^k/2) = 1, where d(k) is the number of divisors of k. - Wesley Ivan Hurt, Oct 11 2013
Also, union of odd primes (A065091) and the divisors of 4. Also, union of A008578 and 4. - Omar E. Pol, Nov 04 2013
Numbers k such that sigma(k!) is divisible by sigma((k-1)!). - Altug Alkan, Jul 18 2016

Crossrefs

Programs

  • Haskell
    a046022 n = a046022_list !! (n-1)
    a046022_list = [1..4] ++ drop 2 a000040_list
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Maple
    A046022:=n-> `if`((-1)^n*floor(numtheory[tau](n)*(-1)^n/2) = 1, n, NULL); seq(A046022(j), j=1..260); # Wesley Ivan Hurt, Oct 11 2013
  • Mathematica
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]*m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, w]; max = w], {n, 1, 1000}]; a (* Artur Jasinski, Apr 06 2008 *)
  • PARI
    a(n)=if(n<6,n,prime(n-2)) \\ Charles R Greathouse IV, Apr 28 2015
    
  • Python
    from sympy import prime
    def A046022(n): return prime(n-2) if n>4 else n # Chai Wah Wu, Oct 17 2024

Formula

A141295(a(n)) = a(n). - Reinhard Zumkeller, Jun 23 2008
A018194(a(n)) = 1. - Reinhard Zumkeller, Mar 09 2012
A240471(a(n)) = 1. - Reinhard Zumkeller, Apr 06 2014

Extensions

Better description from Frank Ellermann, Jun 15 2001

A061355 Denominator of Sum_{k=0..n} 1/k!.

Original entry on oeis.org

1, 1, 2, 3, 24, 60, 720, 252, 40320, 36288, 3628800, 4989600, 95800320, 3113510400, 17435658240, 326918592000, 20922789888000, 2736057139200, 6402373705728000, 30411275102208, 2432902008176640000, 25545471085854720000, 224800145555521536000
Offset: 0

Views

Author

Amarnath Murthy, Apr 28 2001

Keywords

Comments

An inverse of A002034: A002034(a(n)) = n for n > 0. But not the least inverse: a(n) > A046021(n) for n > 3. - Jonathan Sondow, Jan 09 2005

Examples

			1, 2, 5/2, 8/3, 65/24, 163/60, 1957/720, 685/252, ...
		

Crossrefs

Cf. A061354 (numerators), A093101.
a(n) = n!/A093101(n) for n > 0. See also A002034, A046021.

Programs

  • GAP
    List(List([0..25],n->Sum([0..n],k->1/Factorial(k))),DenominatorRat); # Muniru A Asiru, Jun 01 2018
  • Maple
    BB:=n->sum(1/i!, i=1..n): a:=n->floor(denom(BB(n))): seq(a(n), n=0..22); # Zerinvary Lajos, Mar 28 2007
  • Mathematica
    A061355[n_] := Denominator[Sum[1/k!, {k, 0, n}]]; Array[A061355, 23, 0] (* JungHwan Min, Nov 08 2016 *)
    Accumulate[1/Range[0,30]!]//Denominator (* Harvey P. Dale, Mar 24 2025 *)
  • PARI
    { default(realprecision, 500); e=exp(1); for (n=0, 200, a=denominator(floor(n!*e)/n!); write("b061355.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 21 2009
    
  • PARI
    first(n) = my(res = vector(n), s = 0, f = 1); for(i = 1, n, f *= i; s += 1/f; res[i] = denominator(s)); res \\ David A. Corneth, May 31 2018
    

Formula

Denominators of floor(n!*exp(1))/n!. Denominators of coefficients in expansion of exp(x)/(1-x). - Vladeta Jovovic, Aug 11 2002
a(n) = n!/gcd(n!, 1 + n + n(n-1) + n(n-1)(n-2) + ... + n!). - Jonathan Sondow, Jan 09 2005
a(n) = denominator(exp(1)*gamma(n + 1,1)/gamma(n + 1)). - Gerry Martens, May 31 2018

A038024 Number of k's such that A002034(k) = n.

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 30, 36, 64, 110, 270, 252, 792, 1008, 1440, 1344, 5376, 3936, 14688, 11664, 19760, 35200, 96000, 50880, 97152, 192192, 145152, 239904, 917280, 498240, 2332800, 864000, 2334720, 4300800, 4257792, 3172608
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A046021.

Programs

Formula

a(n) = A027423(n)-A027423(n-1) = A000005(A000142(n))-A000005(A000142(n-1)) i.e., number of divisors of n! which are not divisors of (n-1)! [for n>1]. - Henry Bottomley, Oct 22 2001
Erdős, Graham, Ivić, & Pomerance show that the average order of log a(n) is c log n/(log log n)^2 with c around 0.6289. - Charles R Greathouse IV, Jul 21 2015

A083872 Triangle read by rows in which row n lists first appearance of m such that m divides n!.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 12, 24, 5, 10, 15, 20, 30, 40, 60, 120, 9, 16, 18, 36, 45, 48, 72, 80, 90, 144, 180, 240, 360, 720, 7, 14, 21, 28, 35, 42, 56, 63, 70, 84, 105, 112, 126, 140, 168, 210, 252, 280, 315, 336, 420, 504, 560, 630, 840, 1008, 1260, 1680, 2520, 5040, 32, 64
Offset: 1

Views

Author

Jon Perry, Jun 18 2003

Keywords

Comments

Differs from A110797 starting at a(17)=9.
From Rémy Sigrist, Sep 17 2017: (Start)
Each number k > 0 appears exactly once in the triangle, on row A002034(k).
The n-th row of the triangle:
- contains A038024(n) terms,
- starts with A046021(n),
- ends with n! = A000142(n).
(End)

Examples

			1!:1
2!:1,2 -> 2 as 1 has already appeared
3!:1,2,3,6 -> 3,6
4!:1,2,3,4,6,8,12,24 -> 4,8,12,24
		

Crossrefs

Programs

Extensions

Extended by Ray Chandler, Aug 23 2005

A099120 Least m such that n = S(k) = S(k+m) for some k, where S is the Kempner function A002034.

Original entry on oeis.org

3, 4, 5, 2, 7, 32, 27, 8, 11, 26, 13, 48, 19, 4096, 17, 74, 19, 447, 27, 121, 23, 4005, 3125, 169, 177147, 2401, 29, 1203, 31, 134217728, 459, 289, 551, 2684163, 37
Offset: 3

Views

Author

T. D. Noe, Sep 28 2004

Keywords

Comments

Consider the set Sn of d(n!)-d((n-1)!) positive integers k with S(k) = n, where d is the divisor counting function A000005. For each n, a(n) gives the least difference of integers in the set Sn. For prime n, a(n) = n. For n a power of a prime, a(n) = A046021(n), the least k in Sn. The Tutescu conjecture, which states that the equation S(k) = S(k+1) has no solutions, is equivalent to a(n) > 1 for all n.

Examples

			a(6) = 2 because S(k) = 6 for k = 9, 16, 18, 36, 45, 48, 72, 80, 90, 144, 180, 240, 360, 720 and the least difference is 2, between 16 and 18.
		

References

  • L. Tutescu, "On a Conjecture Concerning the Smarandache Function." Abstracts of Papers Presented to the Amer. Math. Soc. 17, 583, 1996.

Crossrefs

Cf. A099118 (number of times S(k+n) = S(k)), A099119 (greatest k such that S(k) = S(k-n)).

Programs

  • Mathematica
    (*See A002034 for the Kempner function*) a=Table[Kempner[n], {n, 10!}]; Table[lst=Flatten[Position[a, n]]; mn=Infinity; Do[mn=Min[mn, lst[[i+1]]-lst[[i]]], {i, Length[lst]-1}]; mn, {n, 10}]
Showing 1-8 of 8 results.