[go: up one dir, main page]

login
A364380
Numbers k such that k and k+1 are both greedy Jacobsthal-Niven numbers (A364379).
6
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, 85, 86, 87, 92, 99, 104, 105, 111, 115, 116, 125, 128, 135, 144, 155, 170, 171, 176, 182, 183, 195, 204, 213, 219, 224, 260, 264, 267, 275, 304, 305, 324, 329, 341, 344
OFFSET
1,2
COMMENTS
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.
LINKS
MATHEMATICA
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 *)
PROG
(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
lista(350, 2)
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jul 21 2023
STATUS
approved