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

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).

A377986 Number of integers k, with bigomega(k) > 2, whose arithmetic derivative (A003415) is equal to n!, the n-th factorial.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 19 2024

Keywords

Comments

The solutions (composite, nonsemiprime antiderivatives of n!) are given in A377987.

Examples

			See the examples in A377987.
		

Crossrefs

Row lengths of irregular triangle A377987.

Programs

  • PARI
    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]));
    A377986(n) = { my(g=n!); sum(k=1,A002620(g),(bigomega(k)>2) && (A003415(k)==g)); };
    
  • PARI
    A377986(n) = AntiDeriv(n!,2,"a_terms_for_A377987_unsorted.txt"); \\ The rest of the program is given in A376410.

Formula

a(n) = Sum_{k=1..A002620(n!)} [A003415(k) = n! and A001222(k) > 2], where [ ] is the Iverson bracket.
a(n) = A376410(n) - A062311(n).

A140088 Number of primes p such that n!-p is prime.

Original entry on oeis.org

0, 0, 0, 1, 6, 24, 78, 368, 1902, 11062, 77426, 692414, 6261624, 68889928, 764874856, 9274470290
Offset: 0

Views

Author

Leroy Quet and others, May 02 2008

Keywords

Comments

Equals 2*A062311(n) except when n=3.

Crossrefs

Cf. A062311.

Extensions

a(14), a(15) from Hans Havermann, Dec 21 2008

A062309 Number of ways writing n! as sums of a prime and a nonprime.

Original entry on oeis.org

0, 0, 2, 3, 6, 50, 307, 2329, 19907, 181263, 1736542, 19044663, 220730823, 2845615949, 39412442640
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			For n = 4: 4! = 24 = 23+1 = 2+22 = 3+21, so a(4) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(c = 0, m = n!); forprime(p = 2, m-1, if(!isprime(m - p), c++)); c;} \\ Amiram Eldar, Jul 17 2024

Formula

a(n) = A062602(n!).
a(n) = n!/2 - A062310(n) - A062311(n) for n >= 2. - Amiram Eldar, Jul 17 2024

Extensions

a(9)-a(13) from Sean A. Irvine, Mar 26 2023
a(14)-a(15) from Amiram Eldar, Jul 17 2024
Showing 1-4 of 4 results.