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 13 results. Next

A005382 Primes p such that 2p-1 is also prime.

Original entry on oeis.org

2, 3, 7, 19, 31, 37, 79, 97, 139, 157, 199, 211, 229, 271, 307, 331, 337, 367, 379, 439, 499, 547, 577, 601, 607, 619, 661, 691, 727, 811, 829, 877, 937, 967, 997, 1009, 1069, 1171, 1237, 1279, 1297, 1399, 1429, 1459, 1531, 1609, 1627, 1657, 1759, 1867, 2011
Offset: 1

Views

Author

Keywords

Comments

Sequence gives values of p such Sum_{i=1..p} gcd(p,i) = A018804(p) is prime. - Benoit Cloitre, Jan 25 2002
Let q = 2n-1. For these n (and q), the sum of two cyclotomic polynomials can be written as a product of cyclotomic polynomials and as a cyclotomic polynomial in x^2: Phi(q,x) + Phi(2q,x) = 2 Phi(n,x) Phi(2n,x) = 2 Phi(n,x^2). - T. D. Noe, Nov 04 2003
Primes in A006254. - Zak Seidov, Mar 26 2013
If a(n) is in A168421 then A005383(n) is a twin prime with a Ramanujan prime, A005383(n) - 2. If this sequence has an infinite number of terms in A168421, then the twin prime conjecture can be proved. - John W. Nicholson, Dec 05 2013
Records subsequence of A023509 (n >= 2). - David James Sycamore, May 05 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A010051, A000040, A053685 (subsequence), A006254.
Cf. A023509.

Programs

  • Haskell
    a005382 n = a005382_list !! (n-1)
    a005382_list = filter
       ((== 1) . a010051 . (subtract 1) . (* 2)) a000040_list
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Magma
    [n: n in [0..1000] | IsPrime(n) and IsPrime(2*n-1)]; // Vincenzo Librandi, Nov 18 2010
    
  • Maple
    f := proc(Q) local t1,i,j; t1 := []; for i from 1 to 500 do j := ithprime(i); if isprime(2*j-Q) then t1 := [op(t1),j]; fi; od: t1; end; f(1);
    # second Maple program:
    q:= p-> andmap(isprime, [p, 2*p-1]):
    select(q, [$2..2500])[];  # Alois P. Heinz, Dec 16 2024
  • Mathematica
    Select[Prime[Range[300]], PrimeQ[2#-1]&]
  • PARI
    select(p->isprime(2*p-1),primes(500)) \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    forprime(n=2, 10^3, if(ispseudoprime(2*n-1), print1(n, ", "))) \\ Felix Fröhlich, Jun 15 2014

Formula

a(n) = A129521(n) / A005383(n). - Reinhard Zumkeller, Apr 19 2007
a(n) = (A005383(n) + 1)/2. - Zak Seidov, Nov 04 2010

A103667 Primes p such that the largest prime divisor of p-1 is greater than the largest prime divisor of p+1.

Original entry on oeis.org

7, 11, 23, 29, 31, 47, 53, 59, 71, 79, 83, 89, 103, 107, 127, 131, 139, 149, 167, 173, 179, 191, 199, 223, 227, 233, 239, 263, 269, 293, 307, 311, 317, 347, 349, 359, 367, 373, 383, 389, 419, 431, 439, 449, 461, 467, 479, 499, 503, 509, 557, 563, 569, 571, 587
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Comments

Primes of the form 2*A070087(n)+1 for some n. - Charles R Greathouse IV, Dec 22 2022
Conjecture: this sequence is of positive relative density in the primes, perhaps even 1/2. - Charles R Greathouse IV, Dec 22 2022

Examples

			a(1)=7 because the largest prime divisor of 6 is greater than the largest prime divisor of 8.
		

Crossrefs

Cf. A023503 (greatest prime divisor of n-th prime - 1), A023509 (greatest prime divisor of n-th prime + 1), A103666, A070087.

Programs

  • Maple
    filter:= p -> isprime(p) and max(numtheory:-factorset(p-1)) > max(numtheory:-factorset(p+1)):
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Jan 15 2024
  • Mathematica
    Select[Prime@Range[2, 107], If[FactorInteger[#-1][[-1, 1]]>FactorInteger[#+1][[-1, 1]], True]&] (* James C. McMahon, Jan 15 2024 *)

A077313 Primes of the form 2^r*5^s - 1.

Original entry on oeis.org

3, 7, 19, 31, 79, 127, 199, 499, 1249, 1279, 1999, 4999, 5119, 8191, 12799, 20479, 31249, 49999, 51199, 79999, 81919, 131071, 199999, 524287, 799999, 1249999, 1310719, 3124999, 3276799, 4999999, 7812499, 12499999, 19999999, 20479999
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Comments

Primes p such that 10^p is divisible by p+1. Primes p whose fractions p/(p+1) are terminating decimals, i.e., primes p such that A158911(p)=0. Primes p such that the prime divisors of p+1 are also prime divisors of the numbers m obtained by the concatenation of p and p+1. For example, for p=19, m = 1920, the prime divisors of 20 are {2, 5} and the prime divisors of 1920 are {2, 3, 5}. - Jaroslav Krizek, Feb 25 2013
For n > 1, all terms are congruent to 1 (mod 6). - Muniru A Asiru, Sep 29 2017

Examples

			1250000 = 2*2*2*2*5*5*5*5*5*5*5 and 1250000 - 1 = A000040(96469), therefore 1249999 is a term.
List of (r, s): (2, 0), (3, 0), (2, 1), (5, 0), (4, 1), (7, 0), (3, 2), (2, 3), (1, 4), (8, 1), (4, 3), (3, 4), (10, 1), ...  - _Muniru A Asiru_, Sep 29 2017
		

Crossrefs

Programs

  • GAP
    A:=Filtered([1..10^7],IsPrime);;    I:=[5];;
    B:=List(A,i->Elements(Factors(i+1)));;
    C:=List([0..Length(I)],j->List(Combinations(I,j),i->Concatenation([2],i)));;
    A077313:=List(Set(Flat(List([1..Length(C)],i->List([1..Length(C[i])],j->Positions(B,C[i][j]))))),i->A[i]); # Muniru A Asiru, Sep 29 2017
  • Mathematica
    With[{n = 10^8}, Union@ Select[Flatten@ Table[2^p*5^q - 1, {p, 0, Log[2, n/(1)]}, {q, 0, Log[5, n/(2^p)]}], PrimeQ]] (* Michael De Vlieger, Sep 30 2017 *)

Extensions

More terms from Reinhard Zumkeller, Nov 15 2002
More terms from Vladeta Jovovic, May 08 2003

A103666 Primes p such that the largest prime divisor of p-1 is less than the largest prime divisor of p+1.

Original entry on oeis.org

5, 13, 17, 19, 37, 41, 43, 61, 67, 73, 97, 101, 109, 113, 137, 151, 157, 163, 181, 193, 197, 211, 229, 241, 251, 257, 271, 277, 281, 283, 313, 331, 337, 353, 379, 397, 401, 409, 421, 433, 443, 457, 463, 487, 491, 521, 523, 541, 547, 577, 601, 613, 617, 631
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Examples

			a(1)=5 because the largest prime divisor of 4 is less than the largest prime divisor of 6.
		

Crossrefs

Cf. A023503 greatest prime divisor of n-th prime - 1, A023509 greatest prime divisor of n-th prime + 1, A103667.

Programs

  • Mathematica
    Select[Prime[Range[2,200]],Max[Transpose[FactorInteger[#-1]][[1]]]< Max[Transpose[FactorInteger[#+1]][[1]]]&]  (* Harvey P. Dale, Apr 26 2011 *)

A077314 Primes of the form 2^r*7^s - 1.

Original entry on oeis.org

3, 7, 13, 31, 97, 127, 223, 1567, 3583, 4801, 6271, 8191, 19207, 25087, 33613, 76831, 131071, 401407, 524287, 917503, 1229311, 1605631, 3764767, 6588343, 14680063, 184473631, 737894527, 2147483647, 2259801991, 2877292543, 3758096383
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Comments

In all terms except 3, r is odd. - Robert Israel, Jun 08 2018

Crossrefs

Programs

  • Maple
    N:= 10^30: # for all terms <= N
    sort(select(isprime, [3, seq(seq(2^r*7^s-1, r=1..ilog2((N+1)/7^s),2),
    s=0..floor(log[7]((N+1)/2)))])); # Robert Israel, Jun 08 2018

Extensions

Corrected and extended by Ray Chandler, Aug 02 2003

A077315 Primes of the form 2^r * 11^s - 1.

Original entry on oeis.org

3, 7, 31, 43, 127, 241, 967, 5323, 8191, 117127, 131071, 524287, 7496191, 10307263, 77948683, 253755391, 428717761, 738197503, 1714871047, 2147483647, 16240345087, 27437936767, 42218553343, 1965081755647, 2414538435583, 7024111812607, 7860327022591, 16630113370111
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Crossrefs

Programs

  • PARI
    lista(nn) = {my(q=1/2, p, w=List([])); for(r=0, logint(nn, 2), q=2*q; p=q/11; for(s=0, logint(nn\q, 11), p=11*p; if(ispseudoprime(p-1), listput(w, p-1)))); Set(w); } \\ Jinyuan Wang, Feb 23 2020

Extensions

More terms from Ray Chandler, Aug 02 2003
a(26)-a(28) from Jinyuan Wang, Feb 23 2020

A174869 a(n) is 0 if n is a power of 2, otherwise the smallest k > 0 such that A006530(n+k) < A006530(n).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 0, 7, 2, 1, 4, 1, 1, 1, 0, 1, 14, 1, 4, 3, 2, 1, 8, 2, 1, 5, 2, 1, 2, 1, 0, 2, 1, 1, 28, 1, 1, 1, 8, 1, 3, 1, 1, 3, 2, 1, 16, 1, 4, 1, 2, 1, 10, 1, 4, 3, 2, 1, 4, 1, 1, 1, 0, 1, 4, 1, 2, 1, 2, 1, 56, 1, 1, 6, 1, 3, 2, 1, 1, 47, 2, 1, 6, 3, 1, 1, 2, 1, 6, 5, 3, 2, 1, 1, 32, 1, 2, 1, 8, 1, 2, 1
Offset: 1

Views

Author

Vladimir Shevelev, Mar 31 2010

Keywords

Comments

a(n)=1 if the index n is an odd prime.

Crossrefs

Programs

  • Maple
    A006530 := proc(n) option remember; if n = 1 then 1; else max(op(numtheory[factorset](n)) ) ; end if; end proc:
    A174869 := proc(n) if n <= 2 then 0; else gpf := A006530(n) ; if gpf = 2 then 0; else for k from 1 do if A006530(n+k) < gpf then return k; end if; end do: end if; end if; end proc:
    seq(A174869(n),n=1..120) ; # R. J. Mathar, Aug 10 2010
  • Mathematica
    Block[{s = Array[FactorInteger[#][[-1, 1]] &, 120]}, Array[If[IntegerQ@ Log2[#], 0, Block[{k = 1, n = s[[#]]}, While[n <= s[[# + k]], k++; If[# + k > Length[s], AppendTo[s, FactorInteger[# + k][[-1, 1]] ]] ]; k]] &, 102, 2]] (* Michael De Vlieger, Apr 06 2021 *)
  • PARI
    A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);
    A174869(n) = if(!bitand(n,n-1), 0, my(gpf=A006530(n)); for(k=1,oo,if(A006530(n+k)Antti Karttunen, Apr 06 2021

Extensions

More terms from R. J. Mathar, Aug 10 2010

A023510 Greatest exponent in prime-power factorization of prime(n) + 1.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 2, 2, 3, 1, 5, 1, 1, 2, 4, 3, 2, 1, 2, 3, 1, 4, 2, 2, 2, 1, 3, 3, 1, 1, 7, 2, 1, 2, 2, 3, 1, 2, 3, 1, 2, 1, 6, 1, 2, 3, 2, 5, 2, 1, 2, 4, 2, 2, 1, 3, 3, 4, 1, 1, 2, 2, 2, 3, 1, 1, 2, 2, 2, 2, 1, 3, 4, 1, 2, 7, 1, 1, 1, 1, 2, 1, 4, 1, 3, 2, 2, 1, 1, 4, 2, 5, 3, 2, 3, 3, 1, 2, 2
Offset: 1

Views

Author

Keywords

Comments

If a(n)=1 then prime(a(n)) is a term in A049097. - Zak Seidov, Jul 20 2016

Examples

			For n=5, the fifth prime is 11, and the prime factorization of 11 + 1 = 12 is 2^2*3. This has exponents 2 and 1, so a(5) is the largest of these exponents, 2. - _Michael B. Porter_, Jul 20 2016
		

Crossrefs

Programs

  • Mathematica
    Table[Max[#[[2]] & /@ FactorInteger[Prime[k] + 1]], {k, 10000}] (* Zak Seidov, Jul 19 2016 *)
  • PARI
    a(n) = vecmax(factor(prime(n)+1)[,2]) \\ Michel Marcus, Jul 20 2016

Formula

a(n) = A051903(A008864(n)). - Michel Marcus, Jul 20 2016

A076555 Greatest prime divisor of n-th prime + 2.

Original entry on oeis.org

2, 5, 7, 3, 13, 5, 19, 7, 5, 31, 11, 13, 43, 5, 7, 11, 61, 7, 23, 73, 5, 3, 17, 13, 11, 103, 7, 109, 37, 23, 43, 19, 139, 47, 151, 17, 53, 11, 13, 7, 181, 61, 193, 13, 199, 67, 71, 5, 229, 11, 47, 241, 3, 23, 37, 53, 271, 13, 31, 283, 19, 59, 103, 313, 7, 29, 37, 113, 349
Offset: 1

Views

Author

Zak Seidov, Oct 19 2002

Keywords

Comments

Greatest prime divisor of n-th prime + 1 in A023509. Greatest prime divisor of n-th prime + 3 in A023576.

Crossrefs

Programs

  • Mathematica
    FactorInteger[#][[-1,1]]&/@(Prime[Range[70]]+2) (* Harvey P. Dale, Sep 05 2014 *)

A379445 a(n) = gpf(prime(n)-1)*gpf(prime(n)+1), where gpf is A006530.

Original entry on oeis.org

4, 6, 6, 15, 21, 6, 15, 33, 35, 10, 57, 35, 77, 69, 39, 145, 155, 187, 21, 111, 65, 287, 55, 21, 85, 221, 159, 33, 133, 14, 143, 391, 161, 185, 95, 1027, 123, 581, 1247, 445, 65, 57, 291, 77, 55, 371, 259, 2147, 437, 377, 85, 55, 35, 86, 1441, 335, 85, 3197, 329, 3337
Offset: 2

Views

Author

Hugo Pfoertner, Dec 28 2024

Keywords

Comments

Observation: Even terms of A006881 not occurring in this sequence are, e.g., 22, 34, 38, 46, ..., due to the sparseness of Mersenne primes (A000668) and Fermat primes (A000215). Also missing are many multiples of 3, e.g., 3*{31, 67, 79, 83, 101, 103, 113, ...}, as a consequence of the gaps of A058383 and A268640 and the size distribution of prime factors, i.e., the rareness of smooth numbers.

Examples

			a(43390) = 146 because 2^19-1 = A000668(5) is the 43390th prime and the greatest prime factor of 2^19-2 is 73.
		

Crossrefs

Each term > 4 is element of A006881.

Programs

  • Mathematica
    Table[Times @@ Map[FactorInteger[#][[-1, 1]] &, Prime[n] + {-1, 1}], {n, 2, 61}] (* Michael De Vlieger, Jan 20 2025 *)
  • PARI
    a379445(n) = my (p=prime(n), fm=factor(p-1), fp=factor(p+1)); fm[#fm~,1]*fp[#fp~,1]

Formula

a(n) = A023503(n)*A023509(n). - Michel Marcus, Jan 21 2025
Showing 1-10 of 13 results. Next