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

A049091 Duplicate of A039787.

Original entry on oeis.org

2, 3, 7, 11, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 131, 139, 167, 179, 191, 211
Offset: 1

Views

Author

Keywords

A049097 Primes p such that p+1 is squarefree.

Original entry on oeis.org

2, 5, 13, 29, 37, 41, 61, 73, 101, 109, 113, 137, 157, 173, 181, 193, 229, 257, 277, 281, 313, 317, 353, 373, 389, 397, 401, 409, 421, 433, 457, 461, 509, 541, 569, 601, 613, 617, 641, 653, 661, 673, 677, 709, 733, 757, 761, 769, 797, 821, 829, 853, 857
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that core(sigma(k)) = k + 1 where core(k) is the squarefree part of k (A007913). - Benoit Cloitre, May 01 2002
This sequence is infinite and its relative density in the sequence of primes is equal to Artin's constant (A005596): Product_{p prime} (1-1/(p*(p-1))) = 0.373955... (Mirsky, 1949). - Amiram Eldar, Dec 29 2020

Examples

			29 is included since 29 + 1 = 30 = 2*3*5 is squarefree.
17 is not here because 18 is divisible by a square, 9.
		

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(900) | IsSquarefree(p+1) ]; // Vincenzo Librandi, Dec 25 2010
    
  • Maple
    N:= 10000; # to get all entries up to N
    A049097:= select(t -> isprime(t) and numtheory:-issqrfree(t+1), [2, seq(1+2*k,k=1..floor((N-1)/2))]); # Robert Israel, May 11 2014
  • Mathematica
    Select[Prime[Range[100]], SquareFreeQ[# + 1] &] (* Zak Seidov, Feb 08 2016 *)
  • PARI
    lista(nn) = forprime(p=1, nn, if (issquarefree(p+1), print1(p, ", "))); \\ Michel Marcus, Jan 08 2015

Formula

A160696(a(n)) = 1. - Reinhard Zumkeller, May 24 2009
a(n) = A077067(n)-1. - Zak Seidov, Mar 19 2016

A075432 Primes with no squarefree neighbors.

Original entry on oeis.org

17, 19, 53, 89, 97, 127, 149, 151, 163, 197, 199, 233, 241, 251, 269, 271, 293, 307, 337, 349, 379, 449, 487, 491, 521, 523, 557, 577, 593, 631, 701, 727, 739, 751, 773, 809, 811, 881, 883, 919, 953, 991, 1013, 1049, 1051, 1061, 1063, 1097, 1151, 1171, 1249
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

Complement of A075430 in A000040.
From Ludovicus (luiroto(AT)yahoo.com), Dec 07 2009: (Start)
I propose a shorter name: non-Euclidean primes. That is justified by the Euclid's demonstration of the infinitude of primes. It appears that the proportion of non-Euclidean primes respect to primes tend to the limit 1-2A where A = 0.37395581... is Artin's constant. This table calculated by Jens K. Andersen corroborates it:
10^5: 2421 / 9592 = 0.2523978315
10^6: 19812 / 78498 = 0.2523885958
10^7: 167489 / 664579 = 0.2520227091
10^8: 1452678 / 5761455 = 0.2521373507
10^9: 12817966 / 50847534 = 0.2520862860
10^10: 114713084 / 455052511 = 0.2520875750
10^11: 1038117249 / 4118054813 = 0.2520892256
It comes close to the expected 1-2A. (End)
This sequence is infinite by Dirichlet's theorem, since there are infinitely many primes == 17 or 19 (mod 36) and these have no squarefree neighbors. Ludovicus's conjecture about density is correct. Capsule proof: either p-1 or p+1 is divisible by 4, so it suffices to consider the other number (without loss of generality, p+1). For some fixed bound L, p is not divisible by any prime q < L (with finitely many exceptions) so there are q^2 - q possible residue classes for p. The primes in each are uniformly distributed so the probability that p+1 is divisible by q^2 is 1/(q^2 - q). The product of the complements goes to 2A as L increases without bound, and since 2A is an upper bound the limit is sandwiched between. - Charles R Greathouse IV, Aug 27 2014
Primes p such that both p-1 and p+1 are divisible by a square greater than 1. - N. J. A. Sloane, Jul 19 2024

Examples

			p = 17 is a term because 16 = 4^2 and 18=2*3^2 are divisible by squares > 1. - _N. J. A. Sloane_, Jul 19 2024
		

Crossrefs

Intersection of A000040 and A281192.

Programs

  • Haskell
    a075432 n = a075432_list !! (n-1)
    a075432_list = f [2, 4 ..] where
       f (u:vs@(v:ws)) | a008966 v == 1 = f ws
                       | a008966 u == 1 = f vs
                       | a010051' (u + 1) == 0 = f vs
                       | otherwise            = (u + 1) : f vs
    -- Reinhard Zumkeller, May 04 2013
    
  • Maple
    filter:= n -> isprime(n) and not numtheory:-issqrfree(n+1) and not numtheory:-issqrfree(n-1):
    select(filter, [seq(2*i+1, i=1..1000)]); # Robert Israel, Aug 27 2014
  • Mathematica
    lst={}; Do[p=Prime[n]; If[ !SquareFreeQ[Floor[p-1]] && !SquareFreeQ[Floor[p+1]], AppendTo[lst,p]], {n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 20 2008 *)
    Select[Prime[Range[300]],!SquareFreeQ[#-1]&&!SquareFreeQ[#+1]&] (* Harvey P. Dale, Apr 24 2014 *)
  • PARI
    is(n)=!issquarefree(if(n%4==1, n+1, n-1)) && isprime(n) \\ Charles R Greathouse IV, Aug 27 2014

Formula

a(n) ~ Cn log n, where C = 1/(1 - 2A) = 1/(1 - Product_{p>2 prime} (1 - 1/(p^2-p))), where A is the constant in A005596. - Charles R Greathouse IV, Aug 27 2014

Extensions

More terms (that were already in the b-file) from Jeppe Stig Nielsen, Apr 23 2020

A089189 Primes p such that p-1 is cubefree.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 127, 131, 139, 149, 151, 157, 167, 173, 179, 181, 191, 197, 199, 211, 223, 227, 229, 239, 263, 269, 277, 283, 293, 307, 311, 317, 331, 347, 349, 359, 367, 373, 383
Offset: 1

Views

Author

Cino Hilliard, Dec 08 2003 and Reinhard Zumkeller, Aug 11 2004

Keywords

Comments

The ratio of the count of primes p <= n such that p-1 is cubefree to the count of primes <= n converges to 0.69.. . This implies that roughly 70% of the primes less one are cubefree. This compares to about 0.37 of the primes less one are squarefree.
More accurately, the density of this sequence within the primes is Product_{p prime} (1-1/(p^2*(p-1))) = 0.697501... (A065414) (Mirsky, 1949). - Amiram Eldar, Feb 16 2021

Examples

			43 is included because 43-1 = 2*3*7.
41 is omitted because 41-1 = 2^3*5.
97 is omitted because 96 = 2^5*3 since higher powers are also tested for exclusion.
		

Crossrefs

Cf. A004709, A039787, A065414, A097380, A089194 (subsequence).

Programs

  • Haskell
    a097375 n = a097375_list !! (n-1)
    a097375_list = filter ((== 1) . a212793 . (subtract 1)) a000040_list
    -- Reinhard Zumkeller, May 27 2012
    
  • Maple
    filter:= p -> isprime(p) and max(seq(t[2],t=ifactors(p-1)[2]))<=2:
    select(filter, [2,seq(2*i+1,i=1..1000)]); # Robert Israel, Sep 11 2014
  • Mathematica
    f[n_]:=Module[{a=m=0},Do[If[FactorInteger[n][[m,2]]>2,a=1],{m,Length[FactorInteger[n]]}];a]; lst={};Do[p=Prime[n];If[f[p-1]==0,AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 15 2009 *)
    Select[Prime[Range[100]],Max[Transpose[FactorInteger[#-1]][[2]]]<3&] (* Harvey P. Dale, Feb 05 2012 *)
  • PARI
    lista(nn) = forprime(p=2, nn, f = factor(p-1)[,2]; if ((#f == 0) || vecmax(f) < 3, print1(p, ", "));) \\ Michel Marcus, Sep 11 2014

Formula

A212793(a(n) - 1) = 1. - Reinhard Zumkeller, May 27 2012

Extensions

Corrected and extended by Harvey P. Dale, Feb 05 2012

A153213 Primes p such that both p-2 and p+2 are not squarefree.

Original entry on oeis.org

2, 47, 173, 277, 727, 839, 929, 1181, 1423, 1447, 1523, 1627, 1811, 1847, 1861, 1973, 2207, 2297, 2423, 2693, 3323, 3701, 3719, 3877, 4327, 4363, 4457, 4673, 4691, 4903, 5227, 5573, 5821, 5927, 6173, 6221, 6323, 6473, 6577, 6653, 7027, 7103, 7477, 7823
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[ !SquareFreeQ[p-2]&&!SquareFreeQ[p+2],AppendTo[lst,p]],{n,7!}];lst
  • PARI
    is(n)=isprime(n) && !issquarefree(n-2) && !issquarefree(n+2) \\ Charles R Greathouse IV, Nov 05 2017

A049092 Primes p such that p-1 is not squarefree.

Original entry on oeis.org

5, 13, 17, 19, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 127, 137, 149, 151, 157, 163, 173, 181, 193, 197, 199, 229, 233, 241, 251, 257, 269, 271, 277, 281, 293, 307, 313, 317, 337, 349, 353, 373, 379, 389, 397, 401, 409, 421, 433, 449, 457, 461, 487
Offset: 1

Views

Author

Keywords

Comments

Primes p with mu(p-1)=0, where mu is the Möbius function. - T. D. Noe, Nov 03 2003
Primes p such that the sum of the primitive roots of p (see A088144) is 0 mod p. - Jon Wharf, Mar 12 2015
The relative density of this sequence within the primes is 1 - A005596 = 0.626044... - Amiram Eldar, Feb 10 2021

Examples

			p = 257 is here because p-1 = 256 = 2^8.
p = 997 is here because p-1 = 996 = 3*(2^2)*83.
		

Crossrefs

Cf. A005596, A039787, A078330 (primes p with mu(p-1)=-1), A088179 (primes p such that mu(p-1)=1), A089451 (mu(p-1) for prime p), A145199.

Programs

  • Magma
    [ p: p in PrimesUpTo(500) | not IsSquarefree(p-1) ]; // Vincenzo Librandi, Mar 12 2015
    
  • Mathematica
    Select[Prime[Range[400]], MoebiusMu[ #-1]==0&]
  • PARI
    forprime(p=2,500,if(!issquarefree(p-1),print(p))) \\ Michael B. Porter, Mar 16 2015

Formula

a(n) = A145199(n) + 1. - Amiram Eldar, Feb 10 2021

A049149 Numbers k such that the Euler totient function phi(k) is squarefree.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 11, 14, 18, 22, 23, 31, 43, 46, 47, 49, 59, 62, 67, 71, 79, 83, 86, 94, 98, 103, 107, 118, 121, 131, 134, 139, 142, 158, 166, 167, 179, 191, 206, 211, 214, 223, 227, 239, 242, 262, 263, 278, 283, 311, 331, 334, 347, 358, 359, 367, 382, 383
Offset: 1

Views

Author

Keywords

Comments

Consists of 1, 2, 4, p, p^2, 2p, and 2p^2, where p are the odd primes from A039787. - Ivan Neretin, Aug 24 2016

Examples

			a(17) = 49 is here because phi(49) = 42 = 2*3*7 is squarefree. Primes p, such that p-1 is squarefree are included.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], MoebiusMu[EulerPhi[#]] != 0 &]
  • PARI
    isok(n) = issquarefree(eulerphi(n)); \\ Michel Marcus, Aug 24 2016

Formula

The number of terms not exceeding k is (3*a/2) * pi(k) + O(k/(log(k)^c)), where pi(k) = A000720(k), c is any constant > 0, and a = 0.373955... is Artin's constant (A005596) (Pappalardi et al., 2003; Banks and Pappalardi, 2006). - Amiram Eldar, Jul 28 2020

Extensions

Corrected by T. D. Noe, Oct 25 2006

A089200 Primes p such that p-1 is divisible by a cube.

Original entry on oeis.org

17, 41, 73, 89, 97, 109, 113, 137, 163, 193, 233, 241, 251, 257, 271, 281, 313, 337, 353, 379, 401, 409, 433, 449, 457, 487, 521, 541, 569, 577, 593, 601, 617, 641, 673, 751, 757, 761, 769, 809, 811, 857, 881, 919, 929, 937, 953, 977
Offset: 1

Views

Author

Cino Hilliard, Dec 08 2003

Keywords

Comments

This sequence is infinite and its relative density in the sequence of primes is 1 - Product_{p prime} (1-1/(p^2*(p-1))) = 1 - A065414 = 0.30249864150363409671... (Jakimczuk, 2024). - Amiram Eldar, Jul 20 2024

Crossrefs

Programs

  • Mathematica
    f[n_]:=Max[Last/@FactorInteger[n]]; lst={};Do[p=Prime[n];If[f[p-1]>=3,AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 03 2009 *)
    Select[Prime[Range[200]],Count[Transpose[FactorInteger[#-1]][[2]], ?(#>2&)]>0&] (* _Harvey P. Dale, Jan 01 2012 *)
  • PARI
    ispowerfree(m,p1) = { flag=1; y=component(factor(m),2); for(i=1,length(y), if(y[i] >= p1,flag=0;break); ); return(flag) }
    powerfreep3(n,p,k) = { c=0; pc=0; forprime(x=2,n, pc++; if(ispowerfree(x+k,p)==0, c++; print1(x","); ) ); print(); print(c","pc","c/pc+.0) }

A097379 Numbers m such that 1+SquareFreeKernel(m) is prime.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 30, 32, 36, 40, 42, 44, 46, 48, 50, 54, 58, 60, 64, 66, 70, 72, 78, 80, 82, 84, 88, 90, 92, 96, 100, 102, 106, 108, 116, 120, 126, 128, 130, 132, 138, 140, 144, 150, 156, 160, 162, 164, 166, 168, 176, 178, 180, 184, 190, 192
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 11 2004

Keywords

Examples

			m = 100 = (2*5)^2 -> A076618(100) = 1+2*5 = 11 = A000040(5), therefore 100 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], PrimeQ[1 + Times @@ FactorInteger[#][[;; , 1]]] &] (* Amiram Eldar, Feb 01 2024 *)
  • PARI
    is(n) = isprime(1 + vecprod(factor(n)[, 1])); \\ Amiram Eldar, Feb 01 2024

Formula

A076618(a(n)) = A007947(a(n))+1 is prime.

A049231 Primes p such that p - 2 is squarefree.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 31, 37, 41, 43, 53, 59, 61, 67, 71, 73, 79, 89, 97, 103, 107, 109, 113, 131, 139, 151, 157, 163, 167, 179, 181, 193, 197, 199, 211, 223, 229, 233, 239, 241, 251, 257, 269, 271, 283, 293, 307, 311, 313, 331, 337, 347, 349, 359, 367, 373
Offset: 1

Views

Author

Keywords

Comments

This sequence is infinite and its relative density in the sequence of the primes is equal to 2 * Product_{p prime} (1-1/(p*(p-1))) = 2 * A005596 = 0.747911... (Mirsky, 1949). - Amiram Eldar, Feb 27 2021

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[100]],SquareFreeQ[#-2]&] (* Harvey P. Dale, Mar 03 2018 *)
  • PARI
    isok(p) = isprime(p) && issquarefree(p-2); \\ Michel Marcus, Dec 31 2013

Formula

Primes p such that abs(mu(p-2)) = 1.

Extensions

Definition corrected by Michel Marcus, Dec 31 2013
Showing 1-10 of 24 results. Next