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!)
A068149 Triangular numbers in which neighboring digits differ at most by 1. Allowed neighbors of 9 are 0, 8 and 9. 0

%I #8 Dec 05 2013 19:55:11

%S 0,1,3,6,10,21,45,55,66,78,210,666,990,2211,3321,5565,6555,8778,10011,

%T 90100,112101,222111,232221,443211,887778,5433456,5456556,5656566,

%U 5676765,22221111,22321221,34565455,88877778,211099878,212210901

%N Triangular numbers in which neighboring digits differ at most by 1. Allowed neighbors of 9 are 0, 8 and 9.

%t Do[a = IntegerDigits[n(n + 1)/2]; k = 1; l = Length[a]; While[k < l && (Abs[a[[k]]- a[[k + 1]]] < 2 || Abs[a[[k]] - a[[k + 1]]] > 8), k++ ]; If[k == l, Print[n(n + 1)/2]], {n, 0, 10^5} ]

%t Select[Accumulate[Range[0,30000]],Max[Select[Abs[Differences[ IntegerDigits[ #]]], #!=9&]]<2&] (* _Harvey P. Dale_, Oct 09 2013 *)

%Y Cf. A000217.

%K base,easy,nonn

%O 0,3

%A _Amarnath Murthy_, Feb 23 2002

%E Edited and extended by _Robert G. Wilson v_ and _Sascha Kurz_, Mar 01 2002

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 March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)