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!)
A252664 Minimal nontrivial undulant (A046075) divisible by n, or 0 if no undulant is divisible by n. 2

%I #40 Dec 15 2015 22:30:36

%S 101,202,141,212,505,252,161,232,171,1010,121,252,494,252,525,272,272,

%T 252,171,2020,252,242,161,696,525,494,2727,252,232,3030,434,3232,363,

%U 272,525,252,3737,494,585,4040,656,252,989,484,585,414,141,4848,343,5050

%N Minimal nontrivial undulant (A046075) divisible by n, or 0 if no undulant is divisible by n.

%C Undulants are numbers are of the form ababab..... with a and b distinct digits (base 10, a nonzero). An undulate is nontrivial if it has at least 3 digits. - _Danny Rorabaugh_, Apr 22 2015

%H Reiner Moewald, <a href="/A252664/b252664.txt">Table of n, a(n) for n = 1..499</a>

%e 505 is the least entry of A046075 that is divisible by 5, so a(5) = 505. Since an undulant cannot end in 00, a(100)=0. - _Danny Rorabaugh_, Apr 22 2015

%o (Python)

%o feld = []

%o for n in range(3, 500):

%o ...for a in range(1, 10):

%o ......for b in range(10):

%o .........if a != b:

%o ............z_string = ""

%o ............for pos in range(n):

%o ...............if pos % 2 == 0:

%o ..................z_string = z_string + str(a)

%o ...............else:

%o ..................z_string = z_string + str(b)

%o ............z = int(z_string)

%o ............feld.append(z)

%o feld_length = len(feld)

%o for z in range (1, 150):

%o ...start = 0

%o ...while start < feld_length and feld[start] % z != 0:

%o ......start = start + 1

%o ...if start < feld_length:

%o ......print(z, feld[start])

%Y Cf. A046075.

%K nonn,base

%O 1,1

%A _Reiner Moewald_, Mar 22 2015

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 April 23 10:13 EDT 2024. Contains 371905 sequences. (Running on oeis4.)