cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A385702 Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 7.

This page as a plain text file.
%I A385702 #16 Jul 08 2025 14:15:07
%S A385702 0,7,12,19,24,36,41,48,53,65,70,77,82,89,94,102,109,116,123,130,137,
%T A385702 144,151,158,165,172,179,186,193,204,211,218,225,232,239,246,253,260,
%U A385702 267,274,281,288,295,306,313,320,327,334,341,348,355,362,369,376,383,390,397
%N A385702 Numbers such that when the leftmost digit is moved to the unit's place the result is divisible by 7.
%H A385702 Stefano Spezia, <a href="/A385702/b385702.txt">Table of n, a(n) for n = 1..10000</a>
%e A385702 376 is a term since 763 = 109*7 is divisible by 7.
%t A385702 Select[Range[0,400],Divisible[FromDigits[RotateLeft[IntegerDigits[#]]],7] &]
%o A385702 (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
%o A385702 (Python)
%o A385702 def ok(n): return int((s:=str(n))[1:]+s[0])%7 == 0
%o A385702 print([k for k in range(400) if ok(k)]) # _Michael S. Branicky_, Jul 08 2025
%Y A385702 Similar sequences for k=1..9: A001477, A273892, A008585, A385700, A217398, A385701, this sequence, A385703, A008591.
%K A385702 nonn,base,easy
%O A385702 1,2
%A A385702 _Stefano Spezia_, Jul 07 2025