OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellp[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; IntegerDigits[Total[3^(s - 1)], 3]]; lazyPellNivenQ[n_] := Module[{v = pellp[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] > 0 && v[[i + 1]] == 0 && v[[i + 2]] < 2, v[[i ;; i + 2]] += {-1, 2, 1}; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; Divisible[n, Plus @@ v[[i[[1, 1]] ;; -1]]]]; seq[count_, nConsec_] := Module[{lpn = lazyPellNivenQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ lpn, c++; AppendTo[s, k - nConsec]]; lpn = Join[Rest[lpn], {lazyPellNivenQ[k]}]; k++]; s]; seq[30, 3]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 12 2022
STATUS
approved