OFFSET
1,5
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
Let s = A005117.
Table of n, s(n), a(n), a(n)+1 for select n:
n s(n) a(n) a(n)+1
-----------------------------------------------------------------
2 2 = 2 1 2
5 6 = 2 * 3 8 = 2^3 9 = 3^2
7 10 = 2 * 5 4 = 2^2 5
10 14 = 2 * 7 7 8 = 2^3
19 30 = 2 * 3 * 5 80 = 2^4 * 5 81 = 3^4
22 34 = 2 * 17 16 = 2^4 17
28 42 = 2 * 3 * 7 63 = 3^2 * 7 64 = 2^6
41 66 = 2 * 3 * 11 242 = 2 * 11^2 243 = 3^5
63 102 = 2 * 3 * 17 288 = 2^5 * 3^2 289 = 17^2
72 114 = 2 * 3 * 19 512 = 2^9 513 = 3^3 * 19
129 210 = 2 * 3 * 5 * 7 4374 = 2 * 3^7 4375 = 5^4 * 7
437 714 = 2 * 3 * 7 * 17 5831 = 7^3 * 17 5832 = 2^3 * 3^6
.
a(3) = -1 since s(3) = 3, and there are no terms k in {1, 3, 9} such that rad(k+1) | 3. Generally, for odd prime p, there are no terms k in {1, p, p^2} such that rad(k+1) | p.
a(11) = -1 since s(11) = 15, and there exist no k in {1, 3, 5, 9, 15, 25, 27, 45, 75, 81, 125, 135, 225} such that rad(k+1) | 15, etc.
MATHEMATICA
s = Select[Range[110], SquareFreeQ]; rad[x_] := Times @@ FactorInteger[x][[All, 1]]; f[x_] := Select[Range[x^2, 1, -1], Divisible[x, rad[#] ] &]; Table[If[ListQ[#], #[[-1]], -1] &@ SelectFirst[Partition[f[s[[n]] ], 2, 1], #1 - #2 == 1 & @@ # &], {n, Length[s]}]
CROSSREFS
KEYWORD
sign
AUTHOR
Michael De Vlieger, May 04 2026
STATUS
approved
