OFFSET
1,3
COMMENTS
LINKS
Peter J. C. Moses, Table of n, a(n) for n = 1..1000
FORMULA
For Mersenne prime(n), a(n)=0; for Fermat prime(n)>3, a(n)= n-1.
EXAMPLE
Let n=12. Prime(12)-1=37-1=36. There are only 5 primes less than 36 the adding of which with 36 does not require any carry: 2,3,11,17,19. So a(12)=5.
PROG
(Sage)
def count(x):
c = 0
for y in prime_range(x):
if binomial(y+x-1, y) % 2:
c += 1
return c
[count(i) for i in primes_first_n(100)] # - Tom Edgar, May 01 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Apr 30 2014
EXTENSIONS
More terms from Peter J. C. Moses, Apr 30 2014
STATUS
approved