login
A364124
Numbers k such that k and k+1 are both Stolarsky-Niven numbers (A364123).
4
8, 56, 84, 159, 195, 224, 384, 399, 405, 995, 1140, 1224, 1245, 1295, 1309, 1419, 1420, 1455, 1474, 1507, 2585, 2597, 2600, 2680, 2681, 2727, 2744, 2750, 2799, 2855, 3122, 3311, 3339, 3345, 3618, 3707, 3795, 4004, 6770, 6774, 6984, 6985, 7014, 7074, 7154, 7405
OFFSET
1,1
LINKS
MATHEMATICA
seq[count_, nConsec_] := Module[{cn = stolNivQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ cn, c++; AppendTo[s, k - nConsec]]; cn = Join[Rest[cn], {stolNivQ[k]}]; k++]; s]; seq[50, 2] (* using the function stolNivQ[n] from A364123 *)
PROG
(PARI) lista(count, nConsec) = {my(cn = vector(nConsec, i, isStolNivQ(i)), c = 0, k = nConsec + 1); while(c < count, if(vecsum(cn) == nConsec, c++; print1(k-nConsec, ", ")); cn = concat(vecextract(cn, "^1"), isStolNivQ(k)); k++); } \\ using the function isA364123(n) from A364123
lista(50, 2)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Jul 07 2023
STATUS
approved