OFFSET
1,1
COMMENTS
Conjecture: There are no runs of 4 consecutive Pell-Niven numbers (checked up to 2*10^8).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
4 is a term since 4, 5 and 6 are all Pell-Niven numbers: the minimal Pell representation of 4, A317204(20) = 20, has the sum of digits 2+0 = 2 and 4 is divisible by 2, the minimal Pell representation of 5, A317204(5) = 100, has the sum of digits 1+0+0 = 1 and 5 is divisible by 1, and the minimal Pell representation of 6, A317204(6) = 101, has the sum of digits 1+0+1 = 2 and 6 is divisible by 2.
MATHEMATICA
pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellNivenQ[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]; Divisible[n, Plus @@ IntegerDigits[Total[3^(s - 1)], 3]]]; seq[count_, nConsec_] := Module[{pn = pellNivenQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ pn, c++; AppendTo[s, k - nConsec]]; pn = Join[Rest[pn], {pellNivenQ[k]}]; k++]; s]; seq[30, 3]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 12 2022
STATUS
approved