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.

A210185 Sum of distinct residues of all factorials mod prime(n).

Original entry on oeis.org

1, 3, 7, 12, 24, 56, 97, 103, 156, 224, 341, 494, 608, 521, 732, 821, 997, 1412, 1312, 1228, 1592, 1984, 2212, 2503, 2583, 3158, 3644, 3846, 3309, 4004, 5149, 5394, 6214, 6129, 7667, 6371, 8100, 8320, 8464, 9174, 10195, 10083, 11973, 11660, 12174, 11530, 14053
Offset: 1

Views

Author

Vladimir Shevelev, Mar 18 2012

Keywords

Examples

			Let n=4, p_4=7. We have modulo 7: 1!==1, 2!==2, 3!==6, 4!==3, 5!==1, 6!==6 and for m>=7, m!==0, such that we have 5 distinct residues 0,1,2,3,6. Therefore a(4)=0+1+2+3+6=12.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Union[Mod[Range[Prime[n]]!, Prime[n]]]], {n, 100}] (* T. D. Noe, Mar 18 2012 *)
  • PARI
    a(n) = my(p=prime(n)); vecsum(Set(vector(p, k, k! % p))); \\ Michel Marcus, Dec 15 2018

A210242 Pairs of consecutive primes {p,q} for which the numbers of distinct residues of all factorials mod p and mod q coincide.

Original entry on oeis.org

17, 19, 89, 97, 137, 139, 263, 269, 757, 761, 907, 911, 1201, 1213, 1481, 1483, 2309, 2311, 2609, 2617, 4679, 4691, 5743, 5749, 10733, 10739, 16103, 16111, 16267, 16273, 19759, 19763, 20269, 20287, 32531, 32533, 35509, 35521, 38693, 38699, 42499, 42509, 43633, 43649
Offset: 1

Views

Author

Vladimir Shevelev, Mar 19 2012

Keywords

Crossrefs

Programs

  • Mathematica
    t = {}; last = 2; Do[new = Length[Union[Mod[Range[Prime[n]]!, Prime[n]]]]; If[last == new, AppendTo[t, {Prime[n - 1], Prime[n]}]]; last = new, {n, 2, 100}]; t (* T. D. Noe, Mar 20 2012 *)

Formula

pi(a(2*n)) = pi(a(2*n-1)) + 1.
A210184(pi(a(2*n))) = A210184(pi(a(2*n-1))).

Extensions

More terms from Amiram Eldar, Sep 14 2019

A210336 Pairs of consecutive primes {p,q} for which the numbers of distinct residues of all factorials mod p and mod q are consecutive integers.

Original entry on oeis.org

2, 3, 3, 5, 5, 7, 7, 11, 61, 67, 157, 163, 179, 181, 613, 617, 677, 683, 701, 709, 1433, 1439, 1523, 1531, 1723, 1733, 1733, 1741, 2081, 2083, 2273, 2281, 3917, 3919, 5737, 5741, 6329, 6337, 6691, 6701, 6991, 6997, 8329, 8353, 9173, 9181, 9533, 9539, 11831, 11833
Offset: 1

Views

Author

Vladimir Shevelev, Mar 20 2012

Keywords

Crossrefs

Formula

pi(a(2*n)) = pi(a(2*n-1)) + 1.
A210184(pi(a(2*n))) = A210184(pi(a(2*n-1))) + 1.

Extensions

Missing terms inserted and more terms added by Amiram Eldar, Sep 14 2019

A210337 Sum of distinct residues of all factorials mod 2^n.

Original entry on oeis.org

0, 1, 3, 9, 17, 49, 153, 281, 665, 1433, 3225, 7705, 17945, 47641, 64025, 129561, 293401, 752153, 1341977, 2914841, 6421017, 14547481, 33421849, 71170585, 138279449, 247331353, 645790233, 1182661145, 2558392857, 5779618329, 11685198361, 23496358425
Offset: 0

Views

Author

Vladimir Shevelev, Mar 20 2012

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) local p, m, i, s;
          p:= 2^n;
          m:= 1;
          s:= {};
          for i to p while m<>0 do m:= m*i mod p; s:=s union {m} od;
          add(i, i=s)
        end:
    seq (a(n), n=0..40);  # Alois P. Heinz, Mar 20 2012
  • Mathematica
    a[n_] := Module[{k=0, s={}},  While[(r = Mod[k!, 2^n]) > 0, k++; AppendTo[s,r]]; Total@Union@s]; Array[a, 32, 0] (* Amiram Eldar, Dec 15 2018 *)
  • PARI
    nbf(n) = my(k=1); while(k! % 2^n, k++); k; \\ A007843
    a(n) = my(nb=nbf(n)); vecsum(Set(vector(nb, k, k! % 2^n))); \\ Michel Marcus, Dec 15 2018

Extensions

More terms from Alois P. Heinz, Mar 20 2012
Showing 1-4 of 4 results.