A044075 Numbers k such that the string 3,2 occurs in the base-4 representation of k but not of k-1.
14, 30, 46, 56, 62, 78, 94, 110, 120, 126, 142, 158, 174, 184, 190, 206, 222, 224, 248, 254, 270, 286, 302, 312, 318, 334, 350, 366, 376, 382, 398, 414, 430, 440, 446, 462, 478, 480, 504, 510, 526, 542, 558, 568, 574, 590, 606
Offset: 1
Links
Programs
-
Maple
has32 := proc(n) local shft : shft := n : while shft > 0 do if shft mod 16 = 14 then RETURN(true) ; fi : shft := floor(shft/4) : od : RETURN(false) ; end: isA044075 := proc(n) if has32(n) and not has32(n-1) then return(true): else return(false) : fi : end: n := 1 : a := 1 : while n <= 10000 do while not isA044075(a) do a := a+1 : od : printf("%d %d ",n,a) : a := a+1 : n := n+1 : od : # R. J. Mathar, Dec 07 2006
-
Mathematica
Flatten[Position[Partition[Table[If[MemberQ[Partition[IntegerDigits[n, 4], 2, 1], {3, 2}], 1, 0], {n, 1000}], 2, 1], {0, 1}]] + 1 (* Vincenzo Librandi, Aug 19 2015 *)
Comments