login
A364707
a(n) is the least practical number A005153(k) such that A005153(k+1) - A005153(k) = 2*n, or -1 if no such number exists.
2
2, 8, 42, 112, 368, 180, 1806, 936, 840, 1600, 14168, 6216, 25120, 6272, 16770, 52668, 83720, 24240, 103840, 29440, 35910, 184140, 278334, 197912, 282150, 313040, 266112, 337840, 1438722, 468540, 1254016, 319808, 1486584, 2566432, 1321376, 2003688, 7163646, 3121328
OFFSET
1,1
LINKS
FORMULA
a(n) = A005153(A364706(n)).
EXAMPLE
a(1) = 2 since A005153(2) = 2 and A005153(3) = 4 = 2 + 2*1.
a(2) = 8 since A005153(5) = 8 and A005153(6) = 12 = 8 + 2*2.
a(3) = 42 since A005153(16) = 42 and A005153(17) = 48 = 42 + 2*3.
MATHEMATICA
f[p_, e_] := (p^(e + 1) - 1)/(p - 1); pracQ[n_] := (ind = Position[(fct = FactorInteger[n])[[;; , 1]]/(1 + FoldList[Times, 1, f @@@ Most @ fct]), _?(# > 1 &)]) == {};
seq[len_, nmax_] := Module[{s = Table[0, {len}], n = 2, prev = 2, c = 0, i}, While[c < len && n <= nmax, n+=2; If[pracQ[n], i = (n - prev)/2; If[i <= len && s[[i]] == 0, c++; s[[i]] = prev]; prev= n]]; s]; seq[20, 10^6]
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Aug 04 2023
STATUS
approved