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

A238444 a(n) is the number of (not necessarily distinct) integers i!+(prime(n)-1)!/i!, i=1,2,...,prime(n)-2, which are divisible by prime(n).

Original entry on oeis.org

0, 1, 2, 3, 3, 2, 4, 3, 7, 4, 3, 2, 2, 3, 3, 4, 7, 8, 5, 9, 4, 5, 7, 4, 4, 2, 5, 3, 4, 2, 3, 3, 6, 5, 6, 3, 2, 3, 3, 2, 3, 2, 3, 4, 2, 7, 3, 3, 7, 2, 6, 5, 2, 5, 4, 3, 4, 5, 4, 2, 3, 6, 7, 7, 2, 4, 5, 2, 3, 2, 2, 7, 3, 2, 5, 5, 6, 6, 10, 2, 5, 2, 5, 2, 5, 3, 6
Offset: 1

Views

Author

Vladimir Shevelev, Feb 26 2014

Keywords

Comments

If n>1, then from Wilson's theorem (i=1) and a simple corollary to it (i=prime(n)-2) we have a(n)>=2.
Conjecture: There are infinitely many n for which a(n)=2 (the sequence of corresponding primes is A238460).

Examples

			Let n=4, prime(n)=7. Consider integers i!+6!/i!, i=1,2,3,4,5: 721,362,126,54,126. Among them 721,126,126 are divisible by 7. So a(4)=3.
		

Crossrefs

Programs

  • Maple
    A238444 := proc(n)
        local p,a,i ;
        p := ithprime(n) ;
        a := 0 ;
        for i from 1 to p-2 do
            if modp( i!+(p-1)!/i!,p)= 0 then
                a := a+1 ;
            end if;
        end do;
        a ;
    end proc:
    seq(A238444(n),n=1..20) ; # R. J. Mathar, Mar 06 2014
  • Mathematica
    a[n_] := Module[{p, r}, p = Prime[n]; r = Range[p-2]; Count[r!+(p-1)!/r!, k_ /; Divisible[k, p]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 27 2014 *)
  • PARI
    a(n) = sum(i=1, prime(n)-2, ((i!+(prime(n)-1)!/i!) % prime(n)) == 0); \\ Michel Marcus, Feb 27 2014

Extensions

More terms from Peter J. C. Moses, Feb 26 2014

A238501 Primes p for which x! + (p-1)!/x!==0 (mod p) has only three solutions 1<=x<=p-2.

Original entry on oeis.org

7, 11, 19, 31, 43, 47, 107, 127, 131, 151, 163, 167, 179, 191, 211, 223, 263, 283, 347, 367, 443, 487, 491, 523, 547, 587, 643, 659, 751, 827, 839, 911, 1039, 1051, 1087, 1103, 1123, 1163, 1171, 1223, 1259, 1283, 1291, 1327, 1427, 1439, 1447, 1487, 1523, 1543
Offset: 1

Views

Author

Vladimir Shevelev, Feb 27 2014

Keywords

Comments

All terms are of the form 4*k+3.
Using Wilson's theorem, for every p>3, p==3(mod 4) we have, at least, 3 solutions in [1,p-2] of x! + (p-1)!/x!==0 (mod p): x = 1, x = (p-1)/2, x = p-2.

Crossrefs

Programs

  • Mathematica
    kmax = 400; Select[Select[4*Range[kmax]+3, PrimeQ], (r = Range[#-2]; Count[r!+(#-1)!/r!, k_ /; Divisible[k, #]] == 3)&] (* Jean-François Alcover, Mar 05 2014 *)

Formula

a(n) is prime(k(n)) for which A238444(k(n)) = 3.

Extensions

More terms from Peter J. C. Moses, Feb 27 2014
Showing 1-2 of 2 results.