OFFSET
1,8
COMMENTS
If there are no odd perfect numbers then A324201 gives the positions of all zeros after the initial a(1) = 0.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..4473
FORMULA
PROG
(PARI)
A002487(n) = if(abs(n)<=1, n, A002487(n\2) + if( n%2, A002487(n\2 + 1))); \\ This version works consistently also with negative arguments, so that a(-n) = -a(n). Except that it is very slow on large n.
A002487(n) = { my(s=sign(n), a=1, b=0); n = abs(n); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (s*b); }; \\ So we use this one, modified from the one given in A002487
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 20 2019
STATUS
approved