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 11-16 of 16 results.

A093870 Triangle read by rows: T(n,k) is the k-th prime = -1 (mod n), 1 <= k <= n.

Original entry on oeis.org

2, 3, 5, 2, 5, 11, 3, 7, 11, 19, 19, 29, 59, 79, 89, 5, 11, 17, 23, 29, 41, 13, 41, 83, 97, 139, 167, 181, 7, 23, 31, 47, 71, 79, 103, 127, 17, 53, 71, 89, 107, 179, 197, 233, 251, 19, 29, 59, 79, 89, 109, 139, 149, 179, 199, 43, 109, 131, 197, 241, 263, 307, 373, 439, 461, 571
Offset: 1

Views

Author

Amarnath Murthy, Apr 20 2004

Keywords

Examples

			2;
3,5;
2,5,11;
3,7,11,19;
...
		

Crossrefs

Cf. A077316, A038700 (first column), A093871 (main diagonal).

Programs

  • Mathematica
    row[n_] := Reap[Module[{k, p}, For[k = 0; p = n - 1, k < n, p += n, If[PrimeQ[p], k++; Sow[p]]]]][[2, 1]];
    Array[row, 12] // Flatten (* Jean-François Alcover, Jun 08 2020 *)

Extensions

Edited and extended by Franklin T. Adams-Watters, Aug 29 2006
Definition clarified by Zak Seidov, Apr 16 2013
Duplicate term 139 removed by Jean-François Alcover, Jun 08 2020

A275391 Least k such that n divides sigma(k^k) (k > 0).

Original entry on oeis.org

1, 3, 5, 3, 3, 5, 2, 3, 5, 3, 19, 11, 11, 5, 15, 7, 15, 5, 11, 3, 5, 19, 10, 11, 7, 11, 17, 11, 13, 15, 5, 7, 29, 15, 23, 11, 11, 11, 11, 3, 15, 5, 35, 19, 23, 21, 22, 15, 13, 7, 15, 11, 23, 17, 19, 11, 11, 13, 28, 15, 11, 5, 5, 15, 15, 29, 21, 15, 65, 23, 34, 11, 4, 11, 29, 11, 39, 11, 23, 7, 17
Offset: 1

Views

Author

Altug Alkan, Aug 07 2016

Keywords

Comments

From Robert Israel, Aug 09 2016: (Start)
a(n) <= A038700(n) if n >= 4, since sigma(k^k) == 0 (mod n) if k is an odd prime == -1 (mod n).
If n is prime and n-2 is squarefree, then a(n) <= n-2 since sigma((n-2)^(n-2)) == 0 (mod n).
Conjecture: a(n) <= n-2 for all n > 15, but a(n) = n-2 for infinitely many n. (End)

Examples

			a(11) = 19 because sigma(19^19) is divisible by 11.
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(1)..a(N)
    S:= {$1..N}:
    for k from 1 while S <> {} do
      v:= numtheory:-sigma(k^k);
      F:= select(t -> v mod t = 0, S);
      for n in F do A[n]:= k od:
      S:= S minus F;
    od:
    seq(A[n],n=1..N); # Robert Israel, Aug 09 2016
  • PARI
    a(n) = {my(k=1); while(sigma(k^k) % n != 0, k++); k; }

A086508 If n is even, a(n) = smallest prime == -1 (mod n), If n is odd, a(n) = smallest prime == 1 (mod n).

Original entry on oeis.org

2, 3, 7, 3, 11, 5, 29, 7, 19, 19, 23, 11, 53, 13, 31, 31, 103, 17, 191, 19, 43, 43, 47, 23, 101, 103, 109, 83, 59, 29, 311, 31, 67, 67, 71, 71, 149, 37, 79, 79, 83, 41, 173, 43, 181, 137, 283, 47, 197, 149, 103, 103, 107, 53, 331, 167, 229, 173, 709, 59, 367, 61, 127
Offset: 1

Views

Author

Amarnath Murthy, Jul 29 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{2},With[{prs=Prime[Range[500]]},Flatten[Table[If[OddQ[n],Select[ prs,Mod[#,n] == 1&,1],Select[prs,Mod[#,n]==n-1&,1]],{n,70}]]]] (* Harvey P. Dale, Nov 16 2013 *)

Extensions

More terms from David Wasserman, Mar 09 2005

A225192 Number of primes p such that p is -1 mod n where p < n-th prime.

Original entry on oeis.org

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

Views

Author

Irina Gerasimova, May 01 2013

Keywords

Comments

Primes p(n) such that a(n) = a(n + 1): 2, 5, 17, 19, 23, 73, 97, 103, 173, 193, 233, 239, 263, 293, 347, 349, 353, 373, 449, 467,...
Primes p(n) such that p is not -1 mod n and mod n+1 for all prime p < p(n+1): 2, 97, 829, 1597, 2251,...
Smallest k such that a(k) = n:, 1, 3, 6, 24, 84, 90,...
Numbers n such that a(n) is equal to number of primes p such that n is -1 mod p where p < n-th prime: 1, 2, 3, 4, 7, 8, 10, 14, 15, 20, 22, 28, 31, 32, 34, 40, 44, 45, 46, 50, 52, 55, 57, 63, 65, 70, 72, 87,...

Examples

			Prime 11 == - 1 (mod 12), prime 23 == -1 (mod 12) and 11, 23 < prime(12) = 37, so a(12) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[s = Prime[Range[n - 1]]; Length[Select[s, Mod[#, n] == n - 1 &]], {n, 93}] (* T. D. Noe, May 13 2013 *)
  • PARI
    a(n)=my(s); forstep(p=n-1,prime(n)-1,n,s+=isprime(p)); s \\ Charles R Greathouse IV, Mar 18 2014

A282049 Least prime p such that n divides sigma(p*n).

Original entry on oeis.org

2, 3, 2, 3, 19, 5, 13, 7, 17, 19, 43, 2, 103, 2, 19, 31, 67, 5, 37, 19, 41, 43, 137, 5, 149, 103, 53, 3, 173, 19, 61, 31, 43, 67, 139, 71, 73, 37, 233, 3, 163, 13, 257, 43, 29, 137, 281, 11, 97, 149, 67, 103, 211, 17, 109, 13, 113, 173, 353, 2, 487, 61, 251, 127, 389, 43, 401, 67
Offset: 1

Views

Author

Altug Alkan, Feb 05 2017

Keywords

Comments

a(n) <= A038700(n). Numbers n such that a(n) is not equal to A038700(A017666(n)) are 6, 14, 24, 28, 60, 78, 84, 90, 120, 234, 248, 270, 336, 496, 532, 546, ...

Examples

			a(5) = 19 because 5 divides sigma(19*5) = 120 and 19 is the least prime number with this property.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(p=2); while (sigma(p*n) % n != 0, p = nextprime(p+1)); p; } \\ David A. Corneth, Feb 05 2017

A225318 Numbers n such that either prime(n-1) == -1 (mod n) or prime(n+1) == -1 (mod n) but not both.

Original entry on oeis.org

2, 4, 7, 8, 14, 16, 26, 27, 32, 33, 35, 76, 78, 169, 170, 172, 175, 177, 183, 184, 185, 434, 446, 1054, 1056, 2638, 2702, 6468, 15930, 40069, 40070, 40080, 40112, 40115, 40157, 251721, 251758, 251767, 251770, 251788, 637286, 4124464, 4124704
Offset: 1

Views

Author

Irina Gerasimova, May 05 2013

Keywords

Examples

			2nd prime is 3 and 2 is a member because 1st prime, 2, is congruent to 0 mod 2 and 3rd prime, 5, is congruent to -1 mod 2;
6th prime is 11 and 6 is not a member because 5th prime, 11, is congruent to -1 mod 6 and 7th prime, 17, is congruent to -1 mod 6;
7th prime is 17 and 7 is a member because 6th prime, 13, is congruent to -1 mod 7 and 8th prime, 19, is congruent to 1 mod 6;
14th prime is 43 and 14 is a member because 13th prime, 41, is congruent to -1 mod 14 and 15th prime, 47, is congruent to 5 mod 14.
		

Crossrefs

Programs

  • Maple
    for n from 2 to 100000 do
        if modp(ithprime(n-1),n) = modp(-1,n) then
            pn := true ;
        else
            pn := false ;
        end if;
        if modp(ithprime(n+1),n) = modp(-1,n) then
            pm := true ;
        else
            pm := false ;
        end if;
        if pn <> pm then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, May 09 2013
  • PARI
    is(n)=my(p=prime(n-1),q=nextprime(nextprime(p+1)+1),v=[p+1,q+1]%n); !vecmin(v) && vecmax(v) \\ Charles R Greathouse IV, Mar 18 2014

Extensions

Corrected by R. J. Mathar, May 09 2013
a(36)-a(43) from Alois P. Heinz, May 18 2013
Previous Showing 11-16 of 16 results.