OFFSET
1,3
COMMENTS
"Numbers k such that binary expansion matches ((0)*00(1?)1)*(0*)." - This was the original, somewhat obscure definition involving regexp-syntax.
If n is a term, then 2*n is also a term, and vice versa.
If bit i is 1, then bits i+-2 must be 0.
Numbers k such that 5*k = A048725(k) = A048720(5, k), where A048720 is carryless base-2 multiplication. (Edited by Antti Karttunen, Dec 21 2025)
It appears that k is in the sequence if and only if C(5k,k) is odd (cf. A003714). - Benoit Cloitre, Mar 09 2003
Yes, as remarked in A048715, "This is easily proved using the well-known result that the multiplicity with which a prime p divides C(n+m,n) is the number of carries when adding n+m in base p." - Jason Kimberley, Dec 21 2011
A116361(a(n)) <= 2. - Reinhard Zumkeller, Feb 04 2006
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Wikipedia, Regular expression
FORMULA
{k such that A004198(k, 4*k) = 0}. - Antti Karttunen, Dec 21 2025
MATHEMATICA
Reap[Do[If[OddQ[Binomial[5n, n]], Sow[n]], {n, 0, 400}]][[2, 1]]
(* Alternative: *)
filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, MatchQ[bb, {0}|{1}|{1, 1}|{___, 0, _, 1, ___}|{___ 1, _, 0, ___}] && !MatchQ[bb, {___, 1, _, 1, ___}]];
Select[Range[0, 201], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
PROG
(PARI) is(n)=!bitand(n, n>>2) \\ Charles R Greathouse IV, Oct 03 2016
(PARI) list(lim)=my(v=List(), n, t); while(n<=lim, t=bitand(n, n>>2); if(t, n+=1<<valuation(t, 2), listput(v, n); n++)); Vec(v) \\ Charles R Greathouse IV, Oct 22 2021
KEYWORD
nonn,base,easy
AUTHOR
Antti Karttunen, Mar 30 1999
EXTENSIONS
Name changed and more terms added, and an erroneous claim in the Crossrefs-section corrected by Antti Karttunen, Dec 21 2025
STATUS
approved
