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-20 of 21 results. Next

A092049 Numbers n such that prime(n) == -7 (mod n).

Original entry on oeis.org

1, 2, 3, 24, 29, 30, 170, 171, 173, 176, 178, 184, 185, 186, 2616, 6462, 6467, 6470, 40090, 40115, 40118, 40120, 637330, 10553400, 10553441, 10553451, 10553458, 10553503, 10553548, 27067046, 27067134, 27067136, 69709702, 69709704, 69709716
Offset: 1

Views

Author

Robert G. Wilson v, Feb 18 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == n - 7, Print[n]], {n, 1, 10^9}]

Extensions

Corrected by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 20 2004

A092050 Numbers n such that prime(n) == -8 (mod n).

Original entry on oeis.org

1, 63, 435, 100347, 100353, 100359, 637335, 129992911, 129993001, 129993007, 129993171, 8179002121, 8179002123, 8179002177, 382465573539
Offset: 1

Views

Author

Robert G. Wilson v, Feb 18 2004

Keywords

Comments

No more terms < 2*10^12. - David Wasserman, Jun 09 2005

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == n - 8, Print[n]], {n, 1, 10^9}]

Extensions

Corrected by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 20 2004
More terms from David Wasserman, Jun 09 2005

A092052 Numbers n such that prime(n) == -10 (mod n).

Original entry on oeis.org

1, 3, 437, 2639, 4124589, 27067013, 27067101, 27067139, 27067271, 382465573551, 18262325820327, 18262325820329, 18262325820333, 885992692751831, 6201265271239783, 6201265271239997, 6201265271240071, 6201265271240403, 306268030480171331
Offset: 1

Views

Author

Robert G. Wilson v, Feb 18 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == n - 10, Print[n]], {n, 1, 10^9}]

Extensions

Corrected by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Feb 20 2004
a(10)-a(19) from Giovanni Resta, Feb 23 2020

A052013 Primes that are congruent to -1 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 3, 5, 7, 29, 349, 359, 1091, 3079, 8423, 64579, 64609, 64709, 481043, 481067, 3524317, 3524387, 9559799, 9560009, 9560039, 25874767, 70115921, 189962009, 189962189, 189964241, 189964259, 189964331, 189964367, 189968741, 189968921
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1999

Keywords

Examples

			29 is the tenth prime and 29 == -1 mod 10, so 29 is in the sequence.
31 is the eleventh prime but 31 == 9 mod 11, so 31 is not in the sequence.
		

Crossrefs

Subsequence of A162567.

Programs

  • Mathematica
    divbleQ[m_, n_] := Mod[m, n] == 0; A052013 = {}; Do[p = Prime[n]; If[divbleQ[p + 1, n], AppendTo[A052013, p]], {n, 10!}]; A052013 (* Vladimir Joseph Stephan Orlovsky, Dec 08 2009 *)
    Select[Prime[Range[5000]], Divisible[# + 1, PrimePi[#]] &] (* Alonso del Arte, May 12 2017 *)
    Select[Table[{n,Prime[n]},{n,1056*10^4}],Mod[#[[2]],#[[1]]]==#[[1]]-1&][[All,2]] (* Harvey P. Dale, Oct 29 2022 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (Mod(p,primepi(p)) + 1 == 0, print1(p, ", "))) \\ Michel Marcus, Jan 09 2015
    
  • PARI
    list(lim)=my(v=List(), n, t); forprime(p=2, lim, t=(p+1)/n++; if(denominator(t)==1, listput(v, p))); Vec(v) \\ Charles R Greathouse IV, Feb 18 2016

Formula

a(n) = prime(A045924(n)). - Michel Marcus, Jan 09 2015

A078931 Numbers k that divide prime(k)+1 or prime(k)-1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 10, 12, 14, 70, 72, 181, 182, 440, 1053, 6458, 6459, 6460, 6461, 6466, 6471, 40087, 40089, 100362, 251712, 251732, 251737, 251742, 637236, 637320, 637334, 637336, 1617173, 4124466, 10553445, 10553455, 10553504, 10553505, 10553547, 10553569
Offset: 1

Views

Author

Benoit Cloitre, Jan 12 2003

Keywords

Examples

			181 is in the sequence because the 181st prime is 1087, and 1086 is divisible by 181 (although 1088 is not so divisible).
		

Crossrefs

Programs

  • Mathematica
    ndpQ[n_]:=Module[{p=Prime[n]},Divisible[p-1,n]||Divisible[p+1,n]]; Select[Range[100000],ndpQ]  (* Harvey P. Dale, Apr 03 2011 *)

Formula

Equals A023143 union A045924.
a(n) = A000720(A162567(n)). - Alois P. Heinz, Feb 20 2023

Extensions

Corrected and example added by Harvey P. Dale, Apr 03 2011
Extended with terms from A023143 and A045924 by Michel Marcus, Nov 30 2013

A061437 Numbers n such that n+1 divides prime(n)+1.

Original entry on oeis.org

5, 6, 13, 15, 31, 32, 34, 75, 77, 445, 2701, 15929, 40079, 40156, 251720, 251766, 251769, 251787, 10553437, 10553577, 10553645, 10553815, 179992919, 179993161, 179993169, 3140421756, 3140421774, 3140421782, 55762149085, 55762149089, 55762149101
Offset: 1

Views

Author

Joseph L. Pe, Feb 13 2002

Keywords

Examples

			5+1 divides Prime(5)+1 = 11+1, so 5 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], Mod[Prime[ # ] + 1, # + 1] == 0 &]
  • PARI
    isok(n) = (prime(n)+1) % (n+1) == 0; \\ Michel Marcus, Apr 15 2017

Extensions

Corrected and extended by Don Reble, Nov 20 2006
a(26)-a(31) from Giovanni Resta, Apr 15 2017

A062061 Numbers k such that prime(k)+1 divides k^2.

Original entry on oeis.org

2, 4, 70, 516, 174080, 292050, 637320, 687105342, 14342420320, 214517880600
Offset: 1

Views

Author

Joseph L. Pe, Feb 13 2002

Keywords

Comments

a(9) > 3*10^9. - Donovan Johnson, Oct 14 2009
a(11) > 3*10^11. - Giovanni Resta, Apr 15 2017

Examples

			Prime(4)+1 = 7+1 divides 4^2, so 4 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], Mod[ #^2, Prime[ # ] + 1] == 0 &]
    Select[Range[640000],PowerMod[#,2,Prime[#]+1]==0&] (* The program generates the first seven terms of the sequence. To generate more, increase the Range constant. *) (* Harvey P. Dale, Apr 23 2022 *)
  • PARI
    isok(n) = n^2 % (prime(n)+1) == 0; \\ Michel Marcus, Apr 15 2017

Extensions

a(8) from Donovan Johnson, Oct 14 2009
a(9)-a(10) from Giovanni Resta, Apr 15 2017

A225939 Numbers k that divide prime(k) + prime(k-1).

Original entry on oeis.org

4, 6, 13, 14, 15, 74, 190, 688, 690, 6456, 40082, 251735, 251736, 251738, 399916, 637325, 637326, 637342, 637343, 2582372, 2582434, 4124456, 4124458, 6592686, 10553425, 10553433, 10553818, 27067038, 27067053, 43435902, 69709872, 69709877, 69709945, 69709954, 179992917
Offset: 1

Views

Author

Alex Ratushnyak, May 21 2013

Keywords

Examples

			prime(3) + prime(4) = 5+7 = 12, because 12 is divisible by 4, the latter is in the sequence.
prime(5) + prime(6) = 11+13 = 24, because 24 is divisible by 6, the latter is in the sequence.
		

Crossrefs

Programs

  • C
    #include 
    #define TOP (1ULL<<32)
    int main() {
      unsigned long long i, j, n = 1, prev;
      char *c = (char*)malloc(TOP/2);
      memset(c, 0, TOP/2);
      for (prev = 2, i = 3; i < TOP; i += 2)
        if (c[i>>1]==0) {
          if ((i+prev) % ++n == 0)  printf("%llu, ", n);
          for (prev = i, j = i*i>>1; j < TOP/2; j += i)  c[j] = 1;
        }
      return 0;
    }
    
  • Mathematica
    Select[Range[2,10^4],Divisible[Prime@#+Prime[#-1],#]&] (* Giorgos Kalogeropoulos, Aug 20 2021 *)
  • Sage
    def is_a(n): return (nth_prime(n) + nth_prime(n-1)) % n == 0
    filter(is_a, (2..1000))  # Peter Luschny, May 22 2013

A260989 Integers n such that prime(n-1) + prime(n+1) is a multiple of n.

Original entry on oeis.org

4, 5, 8, 11, 12, 18, 20, 70, 72, 1053, 4116, 6459, 6460, 40083, 63328, 251742, 399924, 637320, 637322, 637330, 2582288, 2582436, 2582488, 10553828, 16899042, 69709721, 179992913, 179992922, 465769813, 749973302, 749973314, 1208198617, 1208198629
Offset: 1

Views

Author

Zak Seidov, Aug 06 2015

Keywords

Examples

			n=4: prime(n-1) + prime(n+1) = 5 + 11 = 16 = 4*n,
n=20: 67 + 73 = 140 = 7*n,
n=16899042: 312632263 + 312632291 = 625264554 = 37*n,
n=69709721: 1394194387 + 1394194453 = 2788388840 = 40*n.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..7*10^3], k in [2..7*10^3] | (NthPrime(n-1) + NthPrime(n+1)) eq n*k]; // Vincenzo Librandi, Aug 07 2015
  • Mathematica
    Select[Range[2, 100000], Mod[Prime[# - 1] + Prime[# + 1], #] == 0 &] (* Michael De Vlieger, Aug 07 2015 *)
  • PARI
    a=2;b=5;for(n=2,10^8,c=a+b;if(c%n<1,print1(n", "));a=nextprime(a+1);b=nextprime(b+1))
    
  • PARI
    p=2;q=3;n=1; forprime(r=5,1e9, if((p+r)%n++==0, print1(n", "));p=q;q=r) \\ Charles R Greathouse IV, Aug 10 2015
    

Extensions

a(27)-a(33) from Charles R Greathouse IV, Aug 10 2015

A064936 Primes p such that gcd(p, prime(p)^2 - 1) does not equal 1.

Original entry on oeis.org

2, 3, 5, 181, 40087, 251737, 335276334037181, 115423110870118057, 115423110870118561
Offset: 1

Views

Author

Robert G. Wilson v, Oct 26 2001

Keywords

Comments

No further terms up to 41161739. - Harvey P. Dale, Dec 23 2011
No further terms up to 250000000. - Sean A. Irvine, Aug 01 2023
From Jason Yuen, Apr 21 2024: (Start)
Primes p such that prime(p)^2 == 1 (mod p).
Prime terms of A023143 or A045924.
No further terms up to 4*10^19. (End)

Examples

			5 belongs in the sequence because gcd(5, P_5^2 -1) = gcd(5, 120) = 5.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ GCD[ Prime[n], Prime[ Prime[n]]^2 - 1] != 1, Print[ Prime[n]] ], {n, 1, 10^6} ]
Previous Showing 11-20 of 21 results. Next