OFFSET
1,2
COMMENTS
This sequence becomes rare for large n: 15 values between 100000 and 101024 and none between 1000000 and 1001024.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
8 is absent since 8 in binary is (1000) with sum=1, while (8+1) has 2 factors.
MATHEMATICA
Select[ Range[ 1024 ], DigitCount[ #, 2, 1 ]===(Plus@@(Last/@FactorInteger[ #+1 ]))& ]
Select[Range[300], DigitCount[#, 2, 1]==PrimeOmega[#+1]&] (* Harvey P. Dale, Mar 11 2023 *)
PROG
(PARI) SumD(x)= { local(s); s=0; while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } baseE(x, b)= { local(d, e, f); e=0; f=1; while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); return(e) } { n=0; for (m=1, 10^9, s=SumD(baseE(m, 2)); f=factor(m + 1)~; e=0; for (i=1, length(f), e+=f[2, i]; if (e>s, break)); if (s==e, write("b064548.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Sep 18 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Wouter Meeussen, Oct 09 2001
STATUS
approved