A086708
Primes p such that p-1 and p+1 are both divisible by cubes (other than 1).
Original entry on oeis.org
271, 487, 593, 751, 809, 919, 1249, 1567, 1783, 1889, 1999, 2647, 2663, 2753, 2969, 3079, 3511, 3617, 3727, 3833, 3943, 4049, 4159, 4481, 4591, 4751, 4801, 5023, 6857, 6967, 7937, 8263, 8369, 9127, 9343, 10289, 10313, 10529, 10639, 11071, 11177
Offset: 1
-
isA086708 := proc(n)
if isprime(n) then
isA046099(n-1) and isA046099(n+1) ;
else
false;
end if;
end proc:
n := 1:
for c from 1 to 50000 do
if isA086708(c) then
printf("%d %d\n",n,c) ;
n := n+1 ;
end if;
end do: # R. J. Mathar, Dec 08 2015
Res:= NULL: count:= 0:
p:= 1:
while count < 100 do
p:= nextprime(p);
if max(seq(t[2],t=ifactors(p-1)[2]))>=3 and max(seq(t[2],t=ifactors(p+1)[2]))>=3 then
count:= count+1; Res:= Res, p;
fi
od:
Res; # Robert Israel, Jul 11 2018
-
f[n_]:=Max[Last/@FactorInteger[n]]; lst={};Do[p=Prime[n];If[f[p-1]>=3&&f[p+1]>=3,AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 03 2009 *)
dbcQ[p_]:=AnyTrue[Surd[#,3]&/@Rest[Divisors[p-1]],IntegerQ]&&AnyTrue[Surd[#,3]&/@Rest[ Divisors[ p+1]],IntegerQ]; Select[ Prime[Range[1500]],dbcQ] (* Harvey P. Dale, Sep 21 2024 *)
-
\\ Input no. of iterations n, power p and number to subtract and add k.
powerfreep4(n,p,k) = { c=0; pc=0; forprime(x=2,n, pc++; if(!ispowerfree(x-k,p) && !ispowerfree(x+k,p), c++; print1(x","); ) ); print(); print(c","pc","c/pc+.0) }
ispowerfree(m,p1) = { flag=1; y=component(factor(m),2); for(i=1,length(y), if(y[i] >= p1,flag=0;break); ); return(flag) } \\ Cino Hilliard, Dec 08 2003
A166003
Primes p such that p+-1, p+-2 and p+-3 are not squarefree.
Original entry on oeis.org
47527, 186247, 218527, 245149, 269953, 377543, 390449, 432277, 447823, 453053, 469649, 518123, 568177, 584911, 589273, 606323, 632347, 661547, 761347, 831751, 848213, 897577, 913327, 925949, 952253, 1172351, 1205647, 1220347, 1241477
Offset: 1
-
f[n_]:=Max[Last/@FactorInteger[n]]; q=2;lst={};Do[p=Prime[n];If[f[p-3]>=q&&f[p-2]>=q&&f[p-1]>=q&&f[p+1]>=q&&f[p+2]>=q&&f[p+3]>=q,AppendTo[lst,p]],{n,6*8!}];lst
Select[Prime[Range[100000]],NoneTrue[#+{-3,-2,-1,1,2,3},SquareFreeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 17 2018 *)
A166001
Primes p such that p-5, p-4, p+4, and p+5 are each divisible by a cube > 1.
Original entry on oeis.org
751379, 2414507, 2839621, 3170371, 4469629, 5736371, 21154909, 22556371, 22991629, 23313371, 23748629, 24338371, 28372621, 31628371, 32079757, 33009629, 41078371, 42270629, 43465307, 44446621, 49746667, 50579339
Offset: 1
-
f[n_]:=Max[Last/@FactorInteger[n]]; q=3;lst={};Do[p=Prime[n];If[f[p-5]>=q&&f[p-4]>=q&&f[p+4]>=q&&f[p+5]>=q,AppendTo[lst,p]],{n,4*8!}];lst
A373464
Largest of a quadruple of primes p[1..4] such that (p[k]+1, k=1..4) is in geometric progression.
Original entry on oeis.org
23, 47, 107, 191, 499, 647, 719, 809, 863, 1249, 1439, 1999, 2591, 2879, 3023, 3779, 4079, 5323, 6911, 7039, 7127, 7559, 8231, 8231, 8747, 9839, 10289, 10289, 10499, 10499, 10529, 10691, 11279, 11519, 12959, 13229, 13309, 13999, 15551, 15551, 15971, 18143, 19207
Offset: 1
The terms of the sequence are column "p[4]" in the following table which lists the sequences of primes, and ratios of the geometric progression (p[k]+1):
n | p[1], p[2], p[3], p[4] | r = (p[k+1]+1) / (p[k]+1)
------+-------------------------+---------------------------
1 | 2, 5, 11, 23 | 2 = 6/3 = 12/6 = 24/12
2 | 5, 11, 23, 47 | 2 = 12/6 = 24/12 = 48/24
3 | 31, 47, 71, 107 | 3/2 = 48/32 = 72/48 = 108/72
4 | 2, 11, 47, 191 | 4 = 12/3 = 48/12 = 192/48
5 | 31, 79, 199, 499 | 5/2 = 80/32 = 200/80 = 500/200
6 | 2, 17, 107, 647 | 6 = 18/3 = 108/18 = 648/108
7 | 89, 179, 359, 719 | 2 = 180/90 = ...
8 | 29, 89, 269, 809 | 3 = 90/30 = ...
9 | 499, 599, 719, 863 | 6/5 = 600/500 = ...
10 | 79, 199, 499, 1249 | 5/2 = 200/80 = ...
11 | 179, 359, 719, 1439 | 2 = 360/180 = ...
12 | 53, 179, 599, 1999 | 10/3 = 180/54 = ...
Subsequence of
A089199 (primes p such that p+1 is divisible by a cube).
-
A373464_upto(N, show=0, D = 1, LIM=N\2) = { my(L=List()); forprime(p=1, LIM, my(denom = p+D); for(numer=denom+1, sqrtnint((N+D) * denom^2, 3), my(r=numer/denom); for(k=1,3, (type(denom * r^k)=="t_INT" && isprime(denom * r^k - D)) || next(2)); listput(L, denom * r^3 - D); show && printf(" | %4d, %4d, %4d, %4d | %s\n",denom-D, denom*r-D, denom*r^2-D, denom*r^3-D, numer/denom))); vecsort(L)}
-
from itertools import islice
from fractions import Fraction
from sympy import nextprime
def A373464_gen(): # generator of terms
p, plist, pset = 1, [], set()
while True:
p = nextprime(p)
for q in plist:
r = Fraction(q+1,p+1)
q2 = r*(q+1)-1
if q2 < 2:
break
if q2.denominator == 1:
q2 = int(q2)
if q2 in pset:
q3 = r*(q2+1)-1
if q3 < 2:
break
if q3.denominator == 1 and int(q3) in pset:
yield p
plist = [p]+plist
pset.add(p)
A373464_list = list(islice(A373464_gen(),20)) # Chai Wah Wu, Jul 16 2024
A166002
Primes p such that p-6, p-5, p+5, and p+6 are each divisible by a cube greater than 1.
Original entry on oeis.org
1934869, 6136619, 11195869, 11845499, 12385381, 33919619, 39139381, 39790381, 52937869, 53209381, 53631131, 54601619, 58690381, 62892131, 67951381, 77212381, 80224619, 88874869, 94544869, 95734381, 99936131, 103805869, 108827869
Offset: 1
-
f[n_]:=Max[Last/@FactorInteger[n]]; q=3;lst={};Do[p=Prime[n];If[f[p-6]>=q&&f[p-5]>=q&&f[p+5]>=q&&f[p+6]>=q,AppendTo[lst,p]],{n,5*9!}];lst
Showing 1-5 of 5 results.
Comments