login
A385700
Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 4.
4
0, 4, 8, 21, 23, 25, 27, 29, 40, 42, 44, 46, 48, 61, 63, 65, 67, 69, 80, 82, 84, 86, 88, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269
OFFSET
1,2
LINKS
EXAMPLE
263 is a term since 632 = 158*4 is divisible by 4.
MATHEMATICA
Select[Range[0, 270], Divisible[FromDigits[RotateLeft[IntegerDigits[#]]], 4] &]
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) % 4 == 0; \\ Michel Marcus, Jul 08 2025
(Python)
def ok(n): return int((s:=str(n))[1:]+s[0])%4 == 0
print([k for k in range(270) if ok(k)]) # Michael S. Branicky, Jul 08 2025
CROSSREFS
Similar sequences for k=1..9: A001477, A273892, A008585, this sequence, A217398, A385701, A385702, A385703, A008591.
Sequence in context: A209451 A102559 A308233 * A371001 A037020 A094878
KEYWORD
nonn,base,easy,look
AUTHOR
Stefano Spezia, Jul 07 2025
STATUS
approved