login
A385702
Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 7.
4
0, 7, 12, 19, 24, 36, 41, 48, 53, 65, 70, 77, 82, 89, 94, 102, 109, 116, 123, 130, 137, 144, 151, 158, 165, 172, 179, 186, 193, 204, 211, 218, 225, 232, 239, 246, 253, 260, 267, 274, 281, 288, 295, 306, 313, 320, 327, 334, 341, 348, 355, 362, 369, 376, 383, 390, 397
OFFSET
1,2
LINKS
EXAMPLE
376 is a term since 763 = 109*7 is divisible by 7.
MATHEMATICA
Select[Range[0, 400], Divisible[FromDigits[RotateLeft[IntegerDigits[#]]], 7] &]
PROG
(PARI) isok(k) = if (k==0, return(1)); my(d=digits(k), v = vector(#d-1, i, d[i+1])); v = concat(v, d[1]); fromdigits(v) % 7 == 0; \\ Michel Marcus, Jul 08 2025
(Python)
def ok(n): return int((s:=str(n))[1:]+s[0])%7 == 0
print([k for k in range(400) if ok(k)]) # Michael S. Branicky, Jul 08 2025
CROSSREFS
Similar sequences for k=1..9: A001477, A273892, A008585, A385700, A217398, A385701, this sequence, A385703, A008591.
Sequence in context: A061141 A256381 A272975 * A190495 A271988 A093330
KEYWORD
nonn,base,easy
AUTHOR
Stefano Spezia, Jul 07 2025
STATUS
approved