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!)
A198486 Numbers with the property that all pairs of consecutive digits differ by 9. 1

%I #41 May 21 2021 04:13:44

%S 1,2,3,4,5,6,7,8,9,90,909,9090,90909,909090,9090909,90909090,

%T 909090909,9090909090,90909090909,909090909090,9090909090909,

%U 90909090909090,909090909090909,9090909090909090,90909090909090909,909090909090909090,9090909090909090909

%N Numbers with the property that all pairs of consecutive digits differ by 9.

%H <a href="/A198486/b198486.txt">Table of n, a(n) for n = 1..27</a>

%t t = {1, 2, 3, 4, 5, 6, 7, 8, 9}; Do[AppendTo[t, 10*t[[-1]]]; AppendTo[t, 10*t[[-1]] + 9], {9}]; t (* _T. D. Noe_, Oct 22 2013 *)

%o (Python)

%o def A198486():

%o print('Numbers whose consecutive digits differ by 9')

%o for i in range(1, 100001):

%o b, n = True, i

%o if n > 9:

%o while n > 9:

%o a = abs((n // 10) % 10 - n % 10)

%o if a != 9: b = False

%o n = n // 10

%o if b: print(i, end=', ')

%o return

%Y Cf. A033075, A033088, A033081, A048406-A048410.

%K nonn,base

%O 1,2

%A _Pieter Stadhouders_, Oct 20 2013

%E More terms from _T. D. Noe_, Oct 22 2013

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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)