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.

A075017 Smallest k such that the concatenation k, k+1,k+2,k+3 is divisible by n; or 0 if no such number exists.

Original entry on oeis.org

1, 1, 3, 3, 2, 3, 2, 3, 3, 7, 8, 3, 7, 17, 12, 3, 5, 3, 19, 17, 24, 15, 17, 3, 22, 7, 3, 17, 17, 27, 6, 3, 15, 5, 2, 3, 9, 19, 15, 17, 15, 45, 44, 37, 12, 17, 39, 3, 45, 47, 21, 41, 52, 3, 37, 17, 57, 17, 62, 57, 53, 53, 66, 3, 7, 15, 2, 21, 63, 17, 12, 3, 6, 9, 72
Offset: 1

Views

Author

Amarnath Murthy, Sep 01 2002

Keywords

Examples

			a(7) = 2 as 7 divides 2345.
		

Crossrefs

Programs

  • PARI
    isok(k, n) = my(v = Str(k)); for (j=1, 3, v = concat(v, Str(k+j))); (eval(v) % n) == 0;
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Jan 21 2017

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003