login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A376252
Concatenated (n+1)||n modulo n.
1
0, 0, 1, 2, 0, 4, 3, 2, 1, 0, 1, 4, 9, 2, 10, 4, 15, 10, 5, 0, 16, 12, 8, 4, 0, 22, 19, 16, 13, 10, 7, 4, 1, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20
OFFSET
1,4
COMMENTS
There is an interesting and striking pattern in the graph of this sequence that appears at n >= 20 and appears to continue indefinitely.
There does not appear to be a corresponding pattern for other bases.
Beyond the first two terms, zeros only appear where n is a multiple of 5.
FORMULA
a(n) = 10^A055642(n) mod n. Concatenation of 1||n modulo n. - Chai Wah Wu, Oct 01 2024
EXAMPLE
For n=2: 32 mod 2 is 0.
For n=123: 124123 mod 123 is 16.
MATHEMATICA
a[n_]:=Mod[FromDigits[Join[IntegerDigits[n+1], IntegerDigits[n]]], n]; Array[a, 80] (* Stefano Spezia, Sep 18 2024 *)
PROG
(PARI) a(n) = eval(concat(Str(n+1), Str(n))) % n; \\ Michel Marcus, Sep 17 2024
(PARI) a(n) = 10*10^logint(n, 10) % n; \\ Ruud H.G. van Tol, Oct 26 2024
(Python)
def a(n): return int(str(n+1)+str(n))%n
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Sep 17 2024
(Python)
def A376252(n): return int('1'+str(n))%n # Chai Wah Wu, Oct 01 2024
CROSSREFS
Sequence in context: A078909 A067458 A088330 * A347323 A324471 A346576
KEYWORD
nonn,base,easy
AUTHOR
Stuart Coe, Sep 17 2024
STATUS
approved