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!)
A289284 Starting with a(1) = 1, a(n) = smallest nonnegative integer not yet in the sequence such that the last digit of a(n-1) plus the first digit of a(n) is equal to 6. The digit 0 is not allowed. 4

%I #9 Jul 24 2017 12:53:14

%S 1,5,11,51,52,4,2,41,53,3,31,54,21,55,12,42,43,32,44,22,45,13,33,34,

%T 23,35,14,24,25,15,16

%N Starting with a(1) = 1, a(n) = smallest nonnegative integer not yet in the sequence such that the last digit of a(n-1) plus the first digit of a(n) is equal to 6. The digit 0 is not allowed.

%C The number of terms of this finite sequence is the sixth central polygonal number, n = 31.

%t Module[{a = {1}, k, d = 6}, TimeConstrained[Do[k = 2; While[Or[MemberQ[a, k], MemberQ[IntegerDigits@ k, 0], # != d] &[Mod[a[[n - 1]], 10] + First@IntegerDigits@ k], k++]; AppendTo[a, k], {n, 2, 100}], 2]; a] (* _Michael De Vlieger_, Jul 14 2017 *)

%Y Cf. A002061, A289283.

%K nonn,base,fini,full

%O 1,2

%A _Enrique Navarrete_, Jul 01 2017

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 24 08:28 EDT 2024. Contains 371927 sequences. (Running on oeis4.)