Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I feel like having a 1 on the first line is cheating given the constraint "using no other digits".


By that argment you shouldn't be able to use factorial function either, because that has a "hidden 1" too:

  fac(n) = n * fac(n-1)   n>0
         = 1              n=0


The one here isn't hidden in any way – it's on the very first line. You might as well just define X = 7 and do 2-2+2-2+X.


I'm not "defining" anything; I'm just using fairly bog standard math that has been around for hundreds of years.


S(N) is just S(N), it's not N+1 unless you define it that way. S(0) is not 1, it's S(0). The successor function doesn't really get mapped to numbers without an explicit additional mapping.


Unless you are talking about an alternative number system where 1+1 is not 2 then yes, S(0) is 1.


No, it's not. That's just the standard model of peano arithmetic. You can map the successor function to many different operations and objects that aren't even numbers.


Yes it is. "1" is just a label for what is also known as S(0) no mater what other ways you invent to refer to that element. Just like 一 is another label for the same concept.


log is also using another digit.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: