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!)
A043107 Numbers k such that 0 and 2 occur juxtaposed in the base-5 representation of k but not of k-1. 1
10, 27, 35, 50, 60, 77, 85, 102, 110, 127, 135, 152, 160, 175, 185, 202, 210, 227, 235, 250, 277, 285, 300, 310, 327, 335, 352, 360, 377, 385, 402, 410, 425, 435, 452, 460, 477, 485, 502, 510, 527, 535, 550, 560, 577, 585, 602 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

MAPLE

has02:= proc(n) local L, i, state;

  L:= convert(n, base, 5);

  state:= 1;

  for i from 1 to nops(L) do

    if L[i] = 0 then

      if state = 2 then return true

      else state:= 0

      fi

    elif L[i] = 2 then

      if state = 0 then return true

      else state:= 2

      fi

    else state:= 1;

    fi

  od;

  false

end proc:

H:= select(has02, {$1..1001}):

sort(convert(H minus map(`+`, H, 1), list)); # Robert Israel, Jan 20 2019

MATHEMATICA

With[{s = Partition[Array[IntegerDigits[#, 5] &, 602], 2, 1]}, Map[FromDigits[#, 5] &, Select[s, And[And[SequenceCount[#1, {0, 2}] == 0, SequenceCount[#1, {2, 0}] == 0], Or[SequenceCount[#2, {0, 2}] > 0, SequenceCount[#2, {2, 0}] > 0]] & @@ # &][[All, -1]] ] ] (* Michael De Vlieger, Jan 20 2019 *)

CROSSREFS

Cf. A007091.

Sequence in context: A301606 A281510 A024168 * A039284 A045177 A043887

Adjacent sequences:  A043104 A043105 A043106 * A043108 A043109 A043110

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

STATUS

approved

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 May 28 04:02 EDT 2022. Contains 354112 sequences. (Running on oeis4.)