OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is 1 - 3/zeta(3) + 3 * Product_{p prime} (1 - 2/p^3) - Product_{p prime} (1 - 3/p^3) = 1 - 3 * A088453 + 3 * A340153 - Product_{p prime} (1 - 3/p^3) = 0.00038922120241968636455... . - Amiram Eldar, Sep 12 2024
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale, terms 1001..3903 from Robert Israel)
EXAMPLE
1376 is divisible by 8, and its neighbors 1375 and 1377 are divisible by 125 and 27, respectively.
MAPLE
N := 10^6: # get all terms <= N
CF := {seq(seq(x^3 * y, y = 1..floor(N/x^3)), x = 2..floor(N^(1/3)))}:
CF intersect map(`-`, CF, 1) intersect map(`+`, CF, 1): # Robert Israel, Jul 16 2014
MATHEMATICA
Select[Range[2, 100000], Max[Transpose[FactorInteger[ # ]][[2]]] >= 3 && Max[Transpose[FactorInteger[# + 1]][[2]]] >= 3 && Max[Transpose[FactorInteger[# - 1]][[2]]] >= 3 &]
cnQ[{a_, b_, c_}] := And@@(# > 2 &/@{a, b, c}); Flatten[Position[Partition[Table[Max[Transpose[FactorInteger[n]][[2]]], {n, 91000}], 3, 1], _?(cnQ[#] &)]] + 1 (* Harvey P. Dale, Jul 28 2013 *)
PROG
(PARI)
iscubefree(n) = vecsort(factor(n)~, 2, 4)[2, 1] < 3
s = []; for(n = 3, 200000, if(!iscubefree(n - 1) && !iscubefree(n) && !iscubefree(n + 1), s = concat(s, n))); s \\ Colin Barker, Jul 16 2014
(PARI) A051903(n)=if(n>1, vecmax(factor(n)[, 2]), 0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Oct 21 2006
STATUS
approved