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

A103664 Primes p such that the number of divisors of p-1 is less than the number of divisors of p+1.

Original entry on oeis.org

2, 3, 5, 11, 17, 23, 29, 47, 53, 59, 71, 79, 83, 89, 107, 131, 139, 149, 167, 173, 179, 191, 197, 223, 227, 233, 239, 251, 263, 269, 293, 311, 317, 347, 359, 367, 383, 389, 419, 431, 439, 443, 449, 461, 467, 479, 499, 503, 509, 557, 563, 569, 587, 593, 599, 607
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Comments

Mathematica coding by Wouter Meeussen and Robert G. Wilson v.

Examples

			a(1)=2 because d(1)=1 < d(3)=2; a(2)=3 because d(2)=2 < d(4)=3.
		

Crossrefs

Cf. A008328 number of divisors of p-1, A008329 number of divisors of p+1, A103665, A103666, A103667.

Programs

  • Maple
    with(numtheory): p:=proc(n) if isprime(n) and tau(n-1)Emeric Deutsch, Feb 22 2005
  • Mathematica
    Select[Prime[Range[1, 140]], Length[Divisors[ # - 1]] < Length[Divisors[ # + 1]] &]
    Select[Prime[Range[200]],DivisorSigma[0,#-1]Harvey P. Dale, May 31 2019 *)

A103665 Primes p such that the number of divisors of p-1 is greater than the number of divisors of p+1.

Original entry on oeis.org

13, 31, 37, 43, 61, 67, 73, 97, 101, 109, 113, 127, 151, 157, 163, 181, 193, 211, 229, 241, 257, 271, 277, 281, 283, 313, 331, 337, 353, 373, 379, 397, 401, 409, 421, 433, 457, 463, 487, 521, 523, 541, 547, 571, 577, 601, 613, 617, 631, 641, 661, 673, 677
Offset: 1

Views

Author

Hugo Pfoertner, Feb 19 2005

Keywords

Comments

Mathematica coding by Wouter Meeussen and Robert G. Wilson v.

Examples

			a(1)=13 because d(12)=6 > d(14)=4.
		

Crossrefs

Cf. A008328 number of divisors of p-1, A008329 number of divisors of p+1, A103664, A103666, A103667.

Programs

  • Mathematica
    Select[Prime[Range[2, 140]], Length[Divisors[ # - 1]] > Length[Divisors[ # + 1]] &]
    Select[Prime[Range[200]],DivisorSigma[0,#-1]>DivisorSigma[0,#+1]&] (* Harvey P. Dale, Aug 21 2022 *)
  • PARI
    forprime (k=2,700,if(numdiv(k-1)>numdiv(k+1),print1(k,", ")))
    \\ Hugo Pfoertner, Nov 30 2017

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 *)

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

A180641 Primes P such that P > (largest prime factor of (P-1)) * (largest prime factor of (P+1)).

Original entry on oeis.org

7, 17, 19, 31, 41, 53, 71, 79, 89, 97, 101, 109, 127, 151, 163, 181, 191, 197, 199, 239, 241, 251, 257, 271, 307, 337, 349, 379, 401, 419, 431, 433, 449, 461, 463, 487, 491, 499, 521, 571, 577, 593, 599, 601, 631, 641, 647, 659, 683, 701, 727, 751, 769, 809
Offset: 1

Views

Author

Karl Hovekamp, Sep 14 2010

Keywords

Examples

			Example: For n = 3, a(3)=19.
The prime P = 19
P-1 = 18 (largest prime factor of 18 is 3)
P+1 = 20 (largest prime factor of 20 is 5)
19 > 3*5.
		

Crossrefs

Cf. A180640. See also A103666, A103667.

Programs

  • Mathematica
    lpfQ[n_]:=Module[{a=FactorInteger[n-1][[-1,1]],b=FactorInteger[n+1][[-1,1]]},n>a*b]; Select[Prime[Range[200]],lpfQ] (* Harvey P. Dale, Aug 16 2013 *)
  • PARI
    lpf(n) = {f = factor(n); return (f[#f~, 1]);}
    lista(nn) = {forprime(p=3, nn,if ((p > lpf(p-1)*lpf(p+1)), print1(p, ", ");););} \\ Michel Marcus, Jul 25 2013

A180640 Primes P such that P < (largest prime factor of (P-1)) * (largest prime factor of (P+1)).

Original entry on oeis.org

2, 3, 5, 11, 13, 23, 29, 37, 43, 47, 59, 61, 67, 73, 83, 103, 107, 113, 131, 137, 139, 149, 157, 167, 173, 179, 193, 211, 223, 227, 229, 233, 263, 269, 277, 281, 283, 293, 311, 313, 317, 331, 347, 353, 359, 367, 373, 383, 389, 397, 409, 421, 439, 443, 457, 467
Offset: 1

Views

Author

Karl Hovekamp, Sep 14 2010

Keywords

Examples

			For n = 3, a(3)=11.
The prime P = 11
P-1 = 10 (largest prime factor of 10 is 5)
P+1 = 12 (largest prime factor of 12 is 3)
11 < 5*3.
		

Crossrefs

Cf. A180641. See also A103666, A103667.

Programs

  • Mathematica
    Select[Prime[Range[100]],#<(FactorInteger[#-1][[-1,1]] FactorInteger[#+1][[-1,1]])&]  (* Harvey P. Dale, Feb 22 2011 *)
  • PARI
    isok(p) = (p==2) || (isprime(p) && (p < vecmax(factor(p-1)[, 1]) * vecmax(factor(p+1)[, 1]))); \\ Michel Marcus, Oct 29 2022

Extensions

Initial term, i.e., 2, added by Harvey P. Dale, Feb 22 2011

A174870 Odd indices m for which A174869(m) is <>1.

Original entry on oeis.org

1, 9, 21, 25, 27, 33, 45, 57, 75, 77, 81, 85, 91, 93, 105, 115, 117, 121, 125, 133, 135, 141, 145, 147, 165, 169, 171, 175, 177, 187, 189, 201, 205, 213, 217, 221, 225, 231, 235, 243, 245, 247, 253, 261, 273, 275, 289, 297, 301, 315, 325, 333, 343, 345, 355, 357, 361, 363
Offset: 1

Views

Author

Vladimir Shevelev, Mar 31 2010

Keywords

Comments

All but the first term in the sequence are composite numbers.

Examples

			The 9 refers to A174869(9) = 7. The 21 refers to A174869(21) = 3.
		

Crossrefs

Extensions

More terms from R. J. Mathar, Aug 10 2010
Showing 1-7 of 7 results.