login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094151 Remainder when concatenation 1,2,3,...up to (n-1) is divided by n. 4
0, 1, 0, 3, 4, 3, 4, 7, 0, 9, 4, 3, 12, 9, 9, 7, 1, 9, 7, 19, 12, 15, 18, 15, 24, 9, 0, 11, 27, 9, 7, 7, 15, 9, 9, 27, 29, 21, 21, 39, 22, 33, 5, 15, 9, 39, 45, 39, 39, 49, 27, 51, 33, 27, 4, 23, 15, 49, 49, 39, 32, 13, 54, 7, 9, 15, 41, 59, 0, 39, 47, 63, 41, 17, 24, 23, 37, 21, 75, 39 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Michael S. Branicky, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A007908(n-1) mod n for n>1. - Michel Marcus, Nov 21 2022

EXAMPLE

a(5) = 15 hence a(6) = least integer multiple of 15/6 = 5.

MATHEMATICA

Table[st = ""; For[i = 0, i <= n - 1, i++, st = st <> ToString[i]]; Mod[ ToExpression[st], n], {n, 1, 100}] (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Nov 12 2004 *)

PROG

(Python)

from itertools import count, islice

def agen():

s = "0"

for n in count(1): yield int(s)%n; s += str(n)

print(list(islice(agen(), 80))) # Michael S. Branicky, Nov 21 2022

(PARI) a(n)=if(n<=9, return(1719%n)); my(m=Mod(123456789, n)); for(d=2, #Str(n-1), my(D=10^d); for(k=D/10, min(D, n)-1, m=D*m+k)); lift(m) \\ Charles R Greathouse IV, Nov 21 2022

CROSSREFS

Cf. A007908, A110740 (indices of 0's).

Cf. A095221.

Sequence in context: A128200 A258168 A061988 * A135800 A178152 A006984

Adjacent sequences: A094148 A094149 A094150 * A094152 A094153 A094154

KEYWORD

nonn,base,easy

AUTHOR

Amarnath Murthy, Apr 29 2004

EXTENSIONS

More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Nov 12 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 2 06:48 EST 2023. Contains 360000 sequences. (Running on oeis4.)