login
Numbers k such that k and k+1 are both Pell-Niven numbers (A352320).
9

%I #8 Mar 14 2022 02:42:37

%S 1,4,5,9,14,28,29,33,39,63,87,110,111,115,125,140,164,168,169,183,255,

%T 275,308,338,410,444,483,507,564,579,584,704,791,984,985,999,1004,

%U 1024,1025,1115,1134,1154,1164,1211,1265,1308,1323,1351,1395,1415,1424,1491

%N Numbers k such that k and k+1 are both Pell-Niven numbers (A352320).

%C All the odd-indexed Pell numbers (A001653) are terms.

%H Amiram Eldar, <a href="/A352321/b352321.txt">Table of n, a(n) for n = 1..10000</a>

%e 4 is a term since 4 and 5 are both 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, and the minimal Pell representation of 5, A317204(5) = 100, has the sum of digits 1+0+0 = 1 and 5 is divisible by 1.

%t pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; q[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]]]; Select[Range[1500], q[#] && q[#+1] &]

%Y Cf. A000129, A265744, A317204.

%Y Subsequence of A352320.

%Y Subsequences: A001653, A352322.

%Y Similar sequences: A330927, A328205, A328209, A328213, A330931, A331086, A333427, A334309, A331820, A342427, A344342, A351715, A351720, A352090, A352108.

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Mar 12 2022