OFFSET
1,1
COMMENTS
Conjecture: this sequence is finite.
Any further terms are greater than 10^11. - Charles R Greathouse IV, Aug 22 2016
From Robert Israel, Apr 27 2020: (Start)
Each term is either of the form 3*2^k with 3*2^k-1 and 3*2^k+1 prime, or 3*2^k-1 with 3*2^k-1 prime and 3*2^(k-1)-1 prime, or 3*2^k+1 with 3*2^k+1 prime and 3*2^(k-1)+1 prime.
Any further terms > 10^2000.
(End)
FORMULA
a(n) >> n log n. - Charles R Greathouse IV, Aug 22 2016
EXAMPLE
6 is in this sequence because the largest odd divisor of 5 is 5, the largest odd divisor of 6 is 3 and the largest odd divisor of 7 is 7, and all three are prime.
MAPLE
Res:= 6:
for k from 2 while length(3*2^k-1)<1000 do
if (isprime(3*2^k-1) and isprime(3*2^(k-1)-1)) then Res:= Res, 3*2^k-1
fi;
if (isprime(3*2^k-1) and isprime(3*2^k+1)) then Res:= Res, 3*2^k;
fi;
if (isprime(3*2^k+1) and isprime(3*2^(k-1)+1)) then Res:= Res, 3*2^k+1;
fi;
od:
Res; # Robert Israel, Apr 27 2020
MATHEMATICA
Select[Range[2, 10^6], Function[n, Times @@ Boole@ PrimeQ@ Map[First@ Reverse@ DeleteCases[Divisors@ #, d_ /; EvenQ@ d] &, n + Range[-1, 1]] == 1]] (* Michael De Vlieger, Aug 22 2016 *)
SequencePosition[Table[If[PrimeQ[Max[Select[Divisors[n], OddQ]]], 1, 0], {n, 800000}], {1, 1, 1}][[;; , 1]]+1 (* Harvey P. Dale, Jun 27 2023 *)
PROG
(Magma) [n: n in [2..3000000] | NumberOfDivisors(2*(n-1))- NumberOfDivisors(n-1)eq 2 and NumberOfDivisors(2(n))-NumberOfDivisors(n) eq 2 and NumberOfDivisors(2*(n+1))- NumberOfDivisors(n+1) eq 2];
(PARI) isA038550(n)=isprime(n>>valuation(n, 2))
is(n)=isA038550(n-1) && isA038550(n) && isA038550(n+1) \\ Charles R Greathouse IV, Aug 22 2016
(PARI) forprime(p=2, 1e11, my(a=isA038550(p-1), b=isA038550(p+1)); if(a && isA038550(p-2), print1(p-1", ")); if(a && b, print1(p", ")); if(b && isA038550(p+2), print1(p+1", "))) \\ may print numbers several times, but won't skip numbers; Charles R Greathouse IV, Aug 22 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 22 2016
STATUS
approved