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-10 of 12 results. Next

A255254 a(n) = (A048891(n)-1)/A023143(n).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 6, 10, 10, 10, 13, 14, 14, 15, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 22, 24, 24, 24, 24, 24, 25, 25, 27, 29, 29, 30, 30, 30, 31, 32, 35, 36, 36, 36, 36, 36, 38, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 42
Offset: 1

Views

Author

Zak Seidov, Feb 19 2015

Keywords

Crossrefs

Extensions

More terms from the data at A023143 and A048891 added by Amiram Eldar, May 07 2024

A023143 Numbers k such that prime(k) == 1 (mod k).

Original entry on oeis.org

1, 2, 5, 6, 12, 14, 181, 6459, 6460, 6466, 100362, 251712, 251732, 637236, 10553504, 10553505, 10553547, 10553827, 10553851, 10553852, 69709709, 69709724, 69709728, 69709869, 69709961, 69709962, 179992920, 179992922, 179993170, 465769815, 465769819, 465769840, 3140421737, 3140421744, 3140421767, 3140421892, 3140421935
Offset: 1

Views

Author

Keywords

Comments

A004648(a(n)) <= 1. - Reinhard Zumkeller, Jul 30 2012

Examples

			6 is in the sequence because the 6th prime, 13, is congruent to 1 (mod 6).
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a023143 n = a023143_list !! (n-1)
    a023143_list = 1 : map (+ 1) (elemIndices 1 a004648_list)
    -- Reinhard Zumkeller, Jul 30 2012, Jun 08 2011
    
  • Magma
    [n: n in [1..10000] | IsIntegral((NthPrime(n)-1)/n)]; // Marius A. Burtea, Dec 30 2018
  • Mathematica
    Do[ If[ IntegerQ[ (Prime[ n ] - 1) / n ], Print[ n ] ], {n, 1, 10^8} ]
  • PARI
    n=0; print1(1); forprime(p=2,1e9, if(p%n++==1, print1(", "n))) \\ Charles R Greathouse IV, Apr 28 2015
    
  • Python
    def A023143(end):
        primes=[2,3]
        a023143_list=[1]
        num=3
        while len(primes)<=end:
            num+=1
            prime=False
            length=len(primes)
            for y in range(0,length):
                if num % primes[y]!=0:
                    prime=True
                else:
                    prime=False
                    break
            if (prime):
                primes.append(num)
        for x in range(2, len(primes)):
            if (primes[x-1]%(x))==1:
                a023143_list.append(x)
        return a023143_list
    # Conner L. Delahanty, Apr 19 2014
    
  • Python
    from sympy import primerange
    def A023143(end): return [n+1 for n, p in enumerate(primerange(2, end)) if (p-1) % (n-1) == 0] # David Radcliffe, Jun 27 2016
    

Extensions

More terms from Jud McCranie, Dec 11 1999
a(30)-a(37) from Zak Seidov, Apr 19 2014
Terms a(33)-a(37) sorted in correct order by Giovanni Resta, Feb 23 2020

A045924 Numbers n such that prime(n) == -1 (mod n).

Original entry on oeis.org

1, 2, 3, 4, 10, 70, 72, 182, 440, 1053, 6458, 6461, 6471, 40087, 40089, 251737, 251742, 637320, 637334, 637336, 1617173, 4124466, 10553445, 10553455, 10553569, 10553570, 10553574, 10553576, 10553819, 10553829, 27067100, 27067262, 69709705, 69709719, 69709734, 69709873
Offset: 1

Views

Author

Keywords

Comments

Same as n such that n divides A008864(n). - David James Sycamore, Jul 23 2018
Also numbers n such that prime(n) == n-1 (mod n). - Muniru A Asiru, Jul 24 2018

Examples

			10 is a member because the 10th prime, 29, is congruent to -1 mod 10.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[Mod[p = NextPrim[p], n] == n - 1, Print[n]], {n, 1, 10^9}] (* Robert G. Wilson v, Feb 18 2004 *)
  • PARI
    isok(n) = Mod(prime(n), n) == -1; \\ Michel Marcus, Jul 24 2018

Extensions

More terms from Patrick De Geest, Nov 15 1999
Terms a(33) and beyond 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

A171430 Primes that are congruent to 3 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 3, 7, 17, 19, 127, 131, 139, 373, 383, 8419, 64553, 175211, 3523901, 3524713, 70115789, 514273231, 514275283, 1394194363, 1394197423, 1394197543, 1394198683, 1394198863, 1394199083, 1394199263, 1394199283, 10246935823, 204475053103, 4086199302923, 11091501631097
Offset: 1

Views

Author

Keywords

Examples

			Mod(7,4)=3, Mod(17,7)=3.
		

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^5], Mod[Prime[#] - 3, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

a(14) from Harvey P. Dale, Oct 21 2016
Terms a(1)-a(2), a(17) and beyond from Giovanni Resta, Feb 23 2020

A162567 Primes p such that pi(p) divides p-1 and/or p+1, where pi(p) is the number of primes <= p.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 29, 37, 43, 349, 359, 1087, 1091, 3079, 8423, 64579, 64591, 64601, 64609, 64661, 64709, 481043, 481067, 1304707, 3523969, 3524249, 3524317, 3524387, 9558541, 9559799, 9560009, 9560039, 25874767, 70115921, 189962009
Offset: 1

Views

Author

Leroy Quet, Jul 06 2009

Keywords

Examples

			The 10th prime is 29. Since 10 divides 29+1 = 30, 29 is in the sequence.
The 12th prime is 37. Since 12 divides 37-1 = 36, 37 is in the sequence.
		

Crossrefs

Union of A048891 and A052013. - Michel Marcus, Mar 04 2019

Programs

  • Maple
    isA162567 := proc(p) RETURN ( (p-1) mod numtheory[pi](p) = 0 or (p+1) mod numtheory[pi](p) = 0 ) ; end: for n from 1 to 50000 do p := ithprime(n) ; if isA162567(p) then printf("%d,",p) ; fi; od: # R. J. Mathar, Jul 30 2009
    with(numtheory): a := proc (n) if `mod`(ithprime(n)-1, pi(ithprime(n))) = 0 or `mod`(ithprime(n)+1, pi(ithprime(n))) = 0 then ithprime(n) else end if end proc: seq(a(n), n = 1 .. 250000); # Emeric Deutsch, Jul 31 2009
  • Mathematica
    Select[Prime[Range[11000000]],Or@@Divisible[{#-1,#+1},PrimePi[#]]&] (* Harvey P. Dale, Sep 08 2012 *)

Formula

a(n) = A000040(A078931(n)). - Alois P. Heinz, Feb 20 2023

Extensions

a(10)-a(35) from Donovan Johnson, Jul 29 2009

A171431 Primes that are congruent to 4 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 379, 389, 9559969, 9559999, 9560119, 9560149, 514274011, 3779851261, 204475055129, 81744303090431, 241849345578327127, 241849345578334537, 241849345578337111, 241849345578359263, 241849345578372913, 241849345578373303, 97199410027250043229, 97199410027250048629, 97199410027250052679
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^6], Mod[Prime[#] - 4, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

Missing a(1) and a(8)-a(20) from Giovanni Resta, Feb 23 2020

A171432 Primes that are congruent to 5 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 3, 5, 23, 53, 137, 480881, 480941, 480989, 481001, 481469, 3524099, 3524113, 3524281, 3524309, 70117933, 189961799, 189961907, 189961997, 189962177, 189962609, 189963941, 189963959, 189968729, 514274867, 514282961, 3779851157, 10246935913, 10246936309, 10246936463
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^5], Mod[Prime[#] - 5, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

a(13) from Harvey P. Dale, Sep 21 2014
Missing a(1)-a(3), a(17) and beyond from Giovanni Resta, Feb 23 2020

A077256 Primes p such that p^k == 1 modulo k, where p=prime(k).

Original entry on oeis.org

3, 7, 11, 13, 19, 29, 37, 43, 53, 61, 71, 89, 103, 131, 151, 173, 181, 223, 229, 239, 251, 281, 311, 349, 359, 409, 433, 503, 541, 571, 593, 601, 619, 659, 661, 683, 691, 701, 719, 769, 827, 857, 911, 941, 953, 997, 1069, 1087, 1091, 1129, 1163, 1223, 1291
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 31 2002

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(t) local p; p:= ithprime(t); if p&^ t mod t = 1 then p else NULL fi end proc:
    map(g, [$1..1000]); # Robert Israel, Oct 31 2016
  • Mathematica
    With[{no=250}, Transpose[Select[Partition[Riffle[Prime[Range[no]], Range[no]],2], PowerMod[First[#],Last[#],Last[#]]==1&]][[1]]]  (* Harvey P. Dale, Jan 05 2011 *)
    Prime[Select[Range[250], PowerMod[Prime[#],#,#]==1&]]

Formula

A077254(A049084(a(n))) = 1.
a(n) = A000040(A077255(n)).

A171434 Primes that are congruent to 7 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 3, 7, 13, 61, 151, 397, 1153, 64567, 64577, 480967, 480979, 9559867, 9559897, 9560167, 189961657, 189961819, 189962593, 189963043, 189964321, 189969379, 514272779, 514275401, 1394193607, 1394194727, 1394198807, 10246936003, 75370121191, 75370121767, 75370121839
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^5], Mod[Prime[#] - 7, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

Missing a(1)-a(4), a(16) and beyond from Giovanni Resta, Feb 23 2020
Showing 1-10 of 12 results. Next