login
Numbers k such that k and k+1 are both greedy Jacobsthal-Niven numbers (A364379).
6

%I #8 Jul 29 2023 03:21:11

%S 1,2,3,4,5,8,9,10,11,14,15,20,21,26,27,32,42,43,44,45,51,56,68,75,84,

%T 85,86,87,92,99,104,105,111,115,116,125,128,135,144,155,170,171,176,

%U 182,183,195,204,213,219,224,260,264,267,275,304,305,324,329,341,344

%N Numbers k such that k and k+1 are both greedy Jacobsthal-Niven numbers (A364379).

%C The positive Jacobsthal numbers, A001045(n) for n >= 1, are terms since their representation in Jacobsthal greedy base is one 1 followed by n-1 0's, so A265745(A001045(n)) = 1 divides A001045(n), and the representation of A001045(n) + 1 is 2 if n <= 2 and otherwise n-3 0's between two 1's, so A265745(A001045(n) + 1) = 2 which divides A001045(n) + 1.

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

%t consecGreedyJN[kmax_, len_] := Module[{m = 1, c = Table[False, {len}], s = {}}, Do[c = Join[Rest[c], {greedyJacobNivenQ[k]}]; If[And @@ c, AppendTo[s, k - len + 1]], {k, 1, kmax}]; s]; consecGreedyJN[350, 2] (* using the function greedyJacobNivenQ[n] from A364379 *)

%o (PARI) lista(kmax, len) = {my(c = vector(len)); for(k = 1, kmax, c = concat(vecextract(c, "^1"), isA364379(k)); if(vecsum(c) == len, print1(k-len+1, ", ")));} \\ using the function isA364379(n) from A364379

%o lista(350, 2)

%Y Cf. A265745, A265747.

%Y Subsequence of A364379.

%Y Subsequences: A364381, A364382, A364383.

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

%K nonn,base

%O 1,2

%A _Amiram Eldar_, Jul 21 2023