A049091 Duplicate of A039787.
2, 3, 7, 11, 23, 31, 43, 47, 59, 67, 71, 79, 83, 103, 107, 131, 139, 167, 179, 191, 211
Offset: 1
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.
29 is included since 29 + 1 = 30 = 2*3*5 is squarefree. 17 is not here because 18 is divisible by a square, 9.
[ p: p in PrimesUpTo(900) | IsSquarefree(p+1) ]; // Vincenzo Librandi, Dec 25 2010
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
Select[Prime[Range[100]], SquareFreeQ[# + 1] &] (* Zak Seidov, Feb 08 2016 *)
lista(nn) = forprime(p=1, nn, if (issquarefree(p+1), print1(p, ", "))); \\ Michel Marcus, Jan 08 2015
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
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
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
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 *)
is(n)=!issquarefree(if(n%4==1, n+1, n-1)) && isprime(n) \\ Charles R Greathouse IV, Aug 27 2014
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.
a097375 n = a097375_list !! (n-1) a097375_list = filter ((== 1) . a212793 . (subtract 1)) a000040_list -- Reinhard Zumkeller, May 27 2012
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
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 *)
lista(nn) = forprime(p=2, nn, f = factor(p-1)[,2]; if ((#f == 0) || vecmax(f) < 3, print1(p, ", "));) \\ Michel Marcus, Sep 11 2014
lst={};Do[p=Prime[n];If[ !SquareFreeQ[p-2]&&!SquareFreeQ[p+2],AppendTo[lst,p]],{n,7!}];lst
is(n)=isprime(n) && !issquarefree(n-2) && !issquarefree(n+2) \\ Charles R Greathouse IV, Nov 05 2017
p = 257 is here because p-1 = 256 = 2^8. p = 997 is here because p-1 = 996 = 3*(2^2)*83.
[ p: p in PrimesUpTo(500) | not IsSquarefree(p-1) ]; // Vincenzo Librandi, Mar 12 2015
Select[Prime[Range[400]], MoebiusMu[ #-1]==0&]
forprime(p=2,500,if(!issquarefree(p-1),print(p))) \\ Michael B. Porter, Mar 16 2015
a(17) = 49 is here because phi(49) = 42 = 2*3*7 is squarefree. Primes p, such that p-1 is squarefree are included.
Select[Range[100], MoebiusMu[EulerPhi[#]] != 0 &]
isok(n) = issquarefree(eulerphi(n)); \\ Michel Marcus, Aug 24 2016
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 *)
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) }
m = 100 = (2*5)^2 -> A076618(100) = 1+2*5 = 11 = A000040(5), therefore 100 is a term.
Select[Range[200], PrimeQ[1 + Times @@ FactorInteger[#][[;; , 1]]] &] (* Amiram Eldar, Feb 01 2024 *)
is(n) = isprime(1 + vecprod(factor(n)[, 1])); \\ Amiram Eldar, Feb 01 2024
Select[Prime[Range[100]],SquareFreeQ[#-2]&] (* Harvey P. Dale, Mar 03 2018 *)
isok(p) = isprime(p) && issquarefree(p-2); \\ Michel Marcus, Dec 31 2013
Comments